[vlc-commits] videotoolbox: require I-frame for h264

Thomas Guillem git at videolan.org
Tue Jul 24 14:07:39 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jul 23 14:49:31 2018 +0200| [60f8fff1d35b7bbd264a70bc6a6a930a344870a0] | committer: Thomas Guillem

videotoolbox: require I-frame for h264

This fixes BadDataErr when playing streams in the middle (when video track is
disabled and enabled).

This happened a lot when running chromecast in the middle of playback.

Furthermore, a BadDataErr from the decoder, while the videotoolbox encoder is
running cause random crashes.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=60f8fff1d35b7bbd264a70bc6a6a930a344870a0
---

 modules/codec/videotoolbox.m | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index acf5a97fa9..9a10815ed8 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1418,6 +1418,7 @@ static int OpenDecoder(vlc_object_t *p_this)
             p_sys->pf_get_extradata = GetDecoderExtradataH264;
             p_sys->pf_fill_reorder_info = FillReorderInfoH264;
             p_sys->b_poc_based_reorder = true;
+            p_sys->b_vt_need_keyframe = true;
             break;
 
         case kCMVideoCodecType_HEVC:



More information about the vlc-commits mailing list