[FFmpeg-devel] [PATCH 21/41] avfromat/rsd: use ff_alloc_extradata()

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


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

diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index 5b53cef..37e544a 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -101,9 +101,7 @@ static int rsd_read_header(AVFormatContext *s)
         /* RSD3GADP is mono, so only alloc enough memory
            to store the coeff table for a single channel. */
 
-        codec->extradata_size = 32;
-        codec->extradata = av_malloc(codec->extradata_size);
-        if (!codec->extradata)
+        if (ff_alloc_extradata(codec, 32))
             return AVERROR(ENOMEM);
 
         start = avio_rl32(pb);
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list