[vlc-commits] videotoolbox: abort if we can't reorder
Thomas Guillem
git at videolan.org
Fri Jan 20 14:47:29 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jan 20 14:46:21 2017 +0100| [d69fd2f253a9cbbde5a8f5ede5965739d472aa75] | committer: Thomas Guillem
videotoolbox: abort if we can't reorder
ref #17855
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d69fd2f253a9cbbde5a8f5ede5965739d472aa75
---
modules/codec/videotoolbox.m | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index d52cc9e..39ef1df 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1083,6 +1083,15 @@ static picture_t *DecodeBlock(decoder_t *p_dec, block_t **pp_block)
return NULL;
}
+ if (p_block->i_pts == VLC_TS_INVALID && p_block->i_dts != VLC_TS_INVALID &&
+ p_sys->i_pic_reorder_max > 1)
+ {
+ /* VideoToolbox won't reorder output frames and there is no way to know
+ * the right order. Abort and use an other decoder. */
+ msg_Warn(p_dec, "unable to reorder output frames, abort");
+ goto reload;
+ }
+
CMSampleBufferRef sampleBuffer =
VTSampleBufferCreate(p_dec, p_sys->videoFormatDescription, p_block);
if (unlikely(!sampleBuffer))
More information about the vlc-commits
mailing list