mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 02:20:07 +01:00
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>
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user