Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2014-03-07 18:31:53 +0400
committerReinhard Tartler <siretart@tauware.de>2014-03-09 04:33:41 +0400
commita643a47d41f4924b66fce339e4b82aaee20825be (patch)
treee923a6e7f410942ea90712b53731aeac2038ed59 /libavcodec/fic.c
parent23af29e8825ac112877b9ac0572ef11e5f0539f2 (diff)
fic: Properly handle skip frames
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> (cherry picked from commit f87a6e500bcdaede22a123b81a2a46779cf7b71a)
Diffstat (limited to 'libavcodec/fic.c')
-rw-r--r--libavcodec/fic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index 9a3bc3eb9c..df034371e0 100644
--- a/libavcodec/fic.c
+++ b/libavcodec/fic.c
@@ -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;