[FFmpeg-cvslog] libtheoraenc: Keep coded_frame.key_frame a write-only variable

Vittorio Giovara git at videolan.org
Mon Jul 20 22:21:51 CEST 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Wed Jul 15 18:41:15 2015 +0100| [f3b4a92241a33d444f7f6018ebc12e2e3a2d335f] | committer: Vittorio Giovara

libtheoraenc: Keep coded_frame.key_frame a write-only variable

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

 libavcodec/libtheoraenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 097336b..612a808 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -349,7 +349,7 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt,
     // multithreaded (which will be disabled unless explicitly requested)
     pkt->pts = pkt->dts = frame->pts;
     avc_context->coded_frame->key_frame = !(o_packet.granulepos & h->keyframe_mask);
-    if (avc_context->coded_frame->key_frame)
+    if (!(o_packet.granulepos & h->keyframe_mask))
         pkt->flags |= AV_PKT_FLAG_KEY;
     *got_packet = 1;
 



More information about the ffmpeg-cvslog mailing list