[FFmpeg-devel] [PATCH 05/41] avformat/yop: use ff_alloc_extradata()

Paul B Mahol onemda at gmail.com
Sun Oct 13 14:48:26 CEST 2013


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavformat/yop.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavformat/yop.c b/libavformat/yop.c
index e962b09..07086d5 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -69,12 +69,7 @@ static int yop_read_header(AVFormatContext *s)
         return AVERROR(ENOMEM);
 
     // Extra data that will be passed to the decoder
-    video_stream->codec->extradata_size = 8;
-
-    video_stream->codec->extradata = av_mallocz(video_stream->codec->extradata_size +
-                                                FF_INPUT_BUFFER_PADDING_SIZE);
-
-    if (!video_stream->codec->extradata)
+    if (ff_alloc_extradata(video_stream->codec, 8))
         return AVERROR(ENOMEM);
 
     // Audio
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list