]> granicus.if.org Git - handbrake/commitdiff
nvenc: fix chapter mark positions
authorJohn Stebbins <jstebbins.hb@gmail.com>
Thu, 29 Nov 2018 18:21:31 +0000 (10:21 -0800)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Thu, 29 Nov 2018 18:21:31 +0000 (10:21 -0800)
Set flag that forces nvenc to produce IDR frames when a keyframe is
forced.  We require IDR frames at chapter marks.

libhb/encavcodec.c

index d7c525a9115a188842012745190551a4b2d2ed50..3637be37e442cfd8ec4bdcf9ebd69adb66000157 100644 (file)
@@ -358,6 +358,9 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
             //for nvenc to "turn off" the maximum bitrate feature
             //that is normally applied to constant quality.
             context->bit_rate = bit_rate_ceiling;
+
+            // Force IDR frames when we force a new keyframe for chapters
+            av_dict_set( &av_opts, "forced-idr", "1", 0 );
         }
         else if ( job->vcodec == HB_VCODEC_FFMPEG_VCE_H264 || job->vcodec == HB_VCODEC_FFMPEG_VCE_H265 )
         {