avformat: add AVFormatContext to ff_get_extradata()

Needed for av_log() inside that function.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol
2016-04-14 18:21:08 +02:00
parent 8e26bdd59b
commit 323b8c95e4
24 changed files with 31 additions and 31 deletions

View File

@@ -3117,7 +3117,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int size)
return ret;
}
int ff_get_extradata(AVCodecParameters *par, AVIOContext *pb, int size)
int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb, int size)
{
int ret = ff_alloc_extradata(par, size);
if (ret < 0)
@@ -3126,7 +3126,7 @@ int ff_get_extradata(AVCodecParameters *par, AVIOContext *pb, int size)
if (ret != size) {
av_freep(&par->extradata);
par->extradata_size = 0;
av_log(par, AV_LOG_ERROR, "Failed to read extradata of size %d\n", size);
av_log(s, AV_LOG_ERROR, "Failed to read extradata of size %d\n", size);
return ret < 0 ? ret : AVERROR_INVALIDDATA;
}