diff --git a/libavformat/nuv.c b/libavformat/nuv.c index 32d0e02f68..2c02de1c6f 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -86,9 +86,8 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst, av_freep(&vst->codec->extradata); vst->codec->extradata_size = 0; } - if (ff_alloc_extradata(vst->codec, size)) + if (ff_get_extradata(vst->codec, pb, size) < 0) return AVERROR(ENOMEM); - avio_read(pb, vst->codec->extradata, size); size = 0; if (!myth) return 0;