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

Michael Niedermayer git at videolan.org
Wed Dec 25 17:48:54 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 25 16:37:42 2013 +0100| [215759a9252b48bc242b611c4615292d7ba6ad88] | committer: Michael Niedermayer

avformat/idcin: use ff_get_extradata()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/idcin.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index f2d5548..cc25fb0 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -205,15 +205,8 @@ static int idcin_read_header(AVFormatContext *s)
     st->codec->height = height;
 
     /* load up the Huffman tables into extradata */
-    if (ff_alloc_extradata(st->codec, HUFFMAN_TABLE_SIZE))
-        return AVERROR(ENOMEM);
-    ret = avio_read(pb, st->codec->extradata, HUFFMAN_TABLE_SIZE);
-    if (ret < 0) {
+    if ((ret = ff_get_extradata(st->codec, pb, HUFFMAN_TABLE_SIZE)) < 0)
         return ret;
-    } else if (ret != HUFFMAN_TABLE_SIZE) {
-        av_log(s, AV_LOG_ERROR, "incomplete header\n");
-        return AVERROR(EIO);
-    }
 
     if (idcin->audio_present) {
         idcin->audio_present = 1;



More information about the ffmpeg-cvslog mailing list