Commit fadb01ca authored by Thomas Guillem's avatar Thomas Guillem

videotoolbox: don't try to open h264 if there is no extra data

And wait for extradata parsed from the input.
parent 6f1334f1
...@@ -240,8 +240,10 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block) ...@@ -240,8 +240,10 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block)
int i_sar_num = 0; int i_sar_num = 0;
if (p_sys->codec == kCMVideoCodecType_H264) { 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) { /* Do a late opening if there is no extra data and no valid video size */
msg_Dbg(p_dec, "waiting for H264 SPS/PPS, extra data %i", p_dec->fmt_in.i_extra); 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 return VLC_SUCCESS; // return VLC_GENERIC to leave the waiting to someone else
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment