avformat/nuv: use ff_get_extradata()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 25 Dec 2013 15:37:42 +0000 (16:37 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 25 Dec 2013 16:38:29 +0000 (17:38 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nuv.c

index 32d0e02..2c02de1 100644 (file)
@@ -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;