]> granicus.if.org Git - handbrake/commitdiff
encavcodec: set frame.key_frame for AMD VCE encoder
authorJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 15 Jan 2019 00:45:27 +0000 (16:45 -0800)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Fri, 18 Jan 2019 20:26:31 +0000 (12:26 -0800)
AMD VCE encoder needs this in order to force an IDR rather than an I
frame.

Fixes https://github.com/HandBrake/HandBrake/issues/1762

(cherry picked from commit 9e6f310208ff7df7345724c87ca8ef84fdaa7270)

libhb/encavcodec.c

index 476fd0d40c5814fb0aced6cfc214c79257f8e1d2..c5ac6f7b739f0b01dfe4e1990a8892084b7754b1 100644 (file)
@@ -857,6 +857,7 @@ static void Encode( hb_work_object_t *w, hb_buffer_t *in,
            when this frame finally pops out of the encoder we'll mark
            its buffer as the start of a chapter. */
         frame.pict_type = AV_PICTURE_TYPE_I;
+        frame.key_frame = 1;
         hb_chapter_enqueue(pv->chapter_queue, in);
     }