1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

fic: Properly handle skip frames

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis 2014-03-07 14:31:53 +00:00
parent f69befe5ee
commit f87a6e500b

View File

@ -166,6 +166,10 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
if (memcmp(src, fic_header, 7))
av_log(avctx, AV_LOG_WARNING, "Invalid FIC Header.\n");
/* Is it a skip frame? */
if (src[17])
goto skip;
nslices = src[13];
if (!nslices) {
av_log(avctx, AV_LOG_ERROR, "Zero slices found.\n");
@ -245,6 +249,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
NULL, nslices, sizeof(ctx->slice_data[0])) < 0)
return ret;
skip:
*got_frame = 1;
if ((ret = av_frame_ref(data, ctx->frame)) < 0)
return ret;