[vlc-commits] videotoolbox: don't try to open h264 if there is no extra data
Thomas Guillem
git at videolan.org
Thu Jul 30 13:40:45 CEST 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jul 30 10:19:28 2015 +0200| [fadb01ca4a77e72aa246442c80629184d03a6990] | committer: Thomas Guillem
videotoolbox: don't try to open h264 if there is no extra data
And wait for extradata parsed from the input.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fadb01ca4a77e72aa246442c80629184d03a6990
---
modules/codec/videotoolbox.m | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 52ea113..68bf1ed 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -240,8 +240,10 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block)
int i_sar_num = 0;
if (p_sys->codec == kCMVideoCodecType_H264) {
- if ((p_dec->fmt_in.video.i_width == 0 || p_dec->fmt_in.video.i_height == 0) && p_block == NULL) {
- msg_Dbg(p_dec, "waiting for H264 SPS/PPS, extra data %i", p_dec->fmt_in.i_extra);
+ /* Do a late opening if there is no extra data and no valid video size */
+ if ((p_dec->fmt_in.video.i_width == 0 || p_dec->fmt_in.video.i_height == 0
+ || p_dec->fmt_in.i_extra == 0) && p_block == NULL) {
+ msg_Err(p_dec, "waiting for H264 SPS/PPS, extra data %i", p_dec->fmt_in.i_extra);
return VLC_SUCCESS; // return VLC_GENERIC to leave the waiting to someone else
}
More information about the vlc-commits
mailing list