[FFmpeg-devel] [PATCH] avformat/segafilmenc - set keyframe bit correctly

Gyan Doshi gyandoshi at gmail.com
Sat May 5 14:46:09 EEST 2018


Since the muxer author hasn't made the change, the patch is submitted.

Reference:

http://www.ffmpeg.org/pipermail/ffmpeg-devel/2018-April/228602.html
-------------- next part --------------
From 79f87ff264c2989193d5e59da8c5cf285940aa50 Mon Sep 17 00:00:00 2001
From: Gyan Doshi <ffmpeg at gyani.pro>
Date: Sat, 5 May 2018 17:04:53 +0530
Subject: [PATCH] avformat/segafilmenc - set keyframe bit correctly

As per
https://web.archive.org/web/20020803104640/http://www.pcisys.net:80/~melanson/codecs/film-format.txt,

the top bit of the info1 chunk is set as 1 for inter-coded frames and 0
otherwise.
---
 libavformat/segafilmenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/segafilmenc.c b/libavformat/segafilmenc.c
index 5b0d7e69e8..524230e461 100644
--- a/libavformat/segafilmenc.c
+++ b/libavformat/segafilmenc.c
@@ -69,7 +69,7 @@ static int film_write_packet_to_header(AVFormatContext *format_context, FILMPack
         info1 = pkt->pts;
         info2 = pkt->duration;
         /* The top bit being set indicates a key frame */
-        if (pkt->keyframe)
+        if (!pkt->keyframe)
             info1 |= (1 << 31);
     }
 
-- 
2.12.2.windows.2


More information about the ffmpeg-devel mailing list