Commit 6eb08783 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  fic: Properly handle skip frames
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents fabf69f3 f87a6e50
...@@ -166,6 +166,10 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data, ...@@ -166,6 +166,10 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
if (memcmp(src, fic_header, 7)) if (memcmp(src, fic_header, 7))
av_log(avctx, AV_LOG_WARNING, "Invalid FIC Header.\n"); av_log(avctx, AV_LOG_WARNING, "Invalid FIC Header.\n");
/* Is it a skip frame? */
if (src[17])
goto skip;
nslices = src[13]; nslices = src[13];
if (!nslices) { if (!nslices) {
av_log(avctx, AV_LOG_ERROR, "Zero slices found.\n"); av_log(avctx, AV_LOG_ERROR, "Zero slices found.\n");
...@@ -246,6 +250,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data, ...@@ -246,6 +250,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
NULL, nslices, sizeof(ctx->slice_data[0])) < 0) NULL, nslices, sizeof(ctx->slice_data[0])) < 0)
return ret; return ret;
skip:
*got_frame = 1; *got_frame = 1;
if ((ret = av_frame_ref(data, ctx->frame)) < 0) if ((ret = av_frame_ref(data, ctx->frame)) < 0)
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment