[FFmpeg-cvslog] avformat/anm: use ff_get_extradata()

Paul B Mahol git at videolan.org
Wed Jan 2 17:35:20 EET 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Jan  2 16:28:46 2019 +0100| [37af319086a6d305b96e34404815af64a2f3e26b] | committer: Paul B Mahol

avformat/anm: use ff_get_extradata()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37af319086a6d305b96e34404815af64a2f3e26b
---

 libavformat/anm.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavformat/anm.c b/libavformat/anm.c
index b31757ab0a..a5ad2fd0ef 100644
--- a/libavformat/anm.c
+++ b/libavformat/anm.c
@@ -132,12 +132,7 @@ static int read_header(AVFormatContext *s)
     avio_skip(pb, 58);
 
     /* color cycling and palette data */
-    st->codecpar->extradata_size = 16*8 + 4*256;
-    st->codecpar->extradata      = av_mallocz(st->codecpar->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
-    if (!st->codecpar->extradata) {
-        return AVERROR(ENOMEM);
-    }
-    ret = avio_read(pb, st->codecpar->extradata, st->codecpar->extradata_size);
+    ret = ff_get_extradata(s, st->codecpar, s->pb, 16*8 + 4*256);
     if (ret < 0)
         return ret;
 



More information about the ffmpeg-cvslog mailing list