]> git.sesse.net Git - ffmpeg/commitdiff
libtheoraenc: Keep coded_frame.key_frame a write-only variable
authorVittorio Giovara <vittorio.giovara@gmail.com>
Wed, 15 Jul 2015 17:41:15 +0000 (18:41 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 20 Jul 2015 13:13:42 +0000 (14:13 +0100)
libavcodec/libtheoraenc.c

index 097336bb950ebd15f255d7d697004e6206961f10..612a80832bfb28864e7be9816a3cd730a1c77659 100644 (file)
@@ -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;