OSDN Git Service

Support flicvideo with 904 bytes extradata.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 22 Apr 2012 20:07:02 +0000 (22:07 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 22 Apr 2012 20:07:02 +0000 (22:07 +0200)
Fixes ticket #1234.

libavcodec/flicvideo.c

index 1754eef..1bf1a76 100644 (file)
@@ -86,8 +86,9 @@ static av_cold int flic_decode_init(AVCodecContext *avctx)
     if (avctx->extradata_size != 0 &&
         avctx->extradata_size != 12 &&
         avctx->extradata_size != 128 &&
+        avctx->extradata_size != 904 &&
         avctx->extradata_size != 1024) {
-        av_log(avctx, AV_LOG_ERROR, "Expected extradata of 12, 128 or 1024 bytes, got %d\n", avctx->extradata_size);
+        av_log(avctx, AV_LOG_ERROR, "Unexpected extradata size %d\n", avctx->extradata_size);
         return AVERROR_INVALIDDATA;
     }
 
@@ -106,8 +107,10 @@ static av_cold int flic_decode_init(AVCodecContext *avctx)
             ptr += 4;
         }
         depth = 8;
-    } else if (avctx->extradata_size == 0) {
         /* FLI in MOV, see e.g. FFmpeg trac issue #626 */
+    } else if (avctx->extradata_size == 0 ||
+        /* see FFmpeg ticket #1234 */
+               avctx->extradata_size == 904) {
         s->fli_type = FLI_TYPE_CODE;
         depth = 8;
     } else {