diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-05-06 21:28:57 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-05-10 07:45:58 +0200 |
commit | a085cfa65414ff4346d8367cfb54d50d4925396f (patch) | |
tree | cc6c802f6f5e3fd40d447bf3d442834be839c1f5 /libavformat/utils.c | |
parent | aef16886dde59d41bdeef8dfe78cd7d9055bf50e (diff) |
avformat/utils: Move ff_get_extradata to demux_utils.c
It is only used by demuxers (although it is hypothetically
possible that some day e.g. a protocol might need it, but
that is unlikely given that they don't deal with AVCodecParameters).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 00c0751195..06401b767c 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -359,22 +359,6 @@ int ff_alloc_extradata(AVCodecParameters *par, int size) return 0; } -int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size) -{ - int ret = ff_alloc_extradata(par, size); - if (ret < 0) - return ret; - ret = ffio_read_size(pb, par->extradata, size); - if (ret < 0) { - av_freep(&par->extradata); - par->extradata_size = 0; - av_log(logctx, AV_LOG_ERROR, "Failed to read extradata of size %d\n", size); - return ret; - } - - return ret; -} - AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s) { for (unsigned i = 0; i < ic->nb_programs; i++) { |