[FFmpeg-cvslog] fic: Properly handle skip frames

Derek Buitenhuis git at videolan.org
Tue Mar 11 11:12:33 CET 2014


ffmpeg | branch: release/2.2 | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Fri Mar  7 14:31:53 2014 +0000| [a643a47d41f4924b66fce339e4b82aaee20825be] | committer: Reinhard Tartler

fic: Properly handle skip frames

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
(cherry picked from commit f87a6e500bcdaede22a123b81a2a46779cf7b71a)

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

 libavcodec/fic.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index 9a3bc3e..df03437 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;



More information about the ffmpeg-cvslog mailing list