[vlc-devel] [PATCH 2/3] videotoolbox: don't loose the first block when we can't reorder
Thomas Guillem
thomas at gllm.fr
Fri Jan 20 17:06:09 CET 2017
---
modules/codec/videotoolbox.m | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 84a6e3d793..312a1811a9 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1079,6 +1079,8 @@ static picture_t *DecodeBlock(decoder_t *p_dec, block_t **pp_block)
/* 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");
+ decoder_DecodeAgain(p_dec, p_block);
+ p_block = NULL;
goto reload;
}
@@ -1132,11 +1134,12 @@ skip:
reload:
/* Add an empty variable so that videotoolbox won't be loaded again for
* this ES */
- if (var_Create(p_dec, "videotoolbox-failed", VLC_VAR_VOID) == VLC_SUCCESS)
+ if (var_Create(p_dec, "videotoolbox-failed", VLC_VAR_VOID) == VLC_SUCCESS)
decoder_RequestReload(p_dec);
else
p_dec->b_error = true;
- block_Release(p_block);
+ if (p_block != NULL)
+ block_Release(p_block);
return NULL;
}
--
2.11.0
More information about the vlc-devel
mailing list