[vlc-commits] codec: videotoolbox: abort in case of kVTVideoDecoderMalfunctionErr
Thomas Guillem
git at videolan.org
Mon Sep 11 17:12:37 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Sep 11 16:45:17 2017 +0200| [70f506c7c9948d9c5fc36532ef8e9eeba3527ed3] | committer: Thomas Guillem
codec: videotoolbox: abort in case of kVTVideoDecoderMalfunctionErr
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=70f506c7c9948d9c5fc36532ef8e9eeba3527ed3
---
modules/codec/videotoolbox.m | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 746ec63197..f726e7d1c6 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1585,12 +1585,17 @@ static void DecoderCallback(void *decompressionOutputRefCon,
{
if (status == kVTVideoDecoderBadDataErr || status == -8969 )
p_info = NULL;
+ if (status == kVTVideoDecoderMalfunctionErr)
+ p_dec->p_sys->b_abort = true;
msg_Warn(p_dec, "decoding of a frame failed (%i, %u)", (int)status,
(unsigned int) infoFlags);
goto end;
}
assert(imageBuffer);
+ if (p_dec->p_sys->b_abort)
+ goto end;
+
if (unlikely(!p_sys->b_format_propagated)) {
p_sys->b_format_propagated =
UpdateVideoFormat(p_dec, imageBuffer) == VLC_SUCCESS;
More information about the vlc-commits
mailing list