|
|
@ -1634,7 +1634,9 @@ again: |
|
|
|
break; |
|
|
|
break; |
|
|
|
case NAL_SPS: |
|
|
|
case NAL_SPS: |
|
|
|
init_get_bits(&h->gb, ptr, bit_length); |
|
|
|
init_get_bits(&h->gb, ptr, bit_length); |
|
|
|
if (ff_h264_decode_seq_parameter_set(h) < 0 && (h->is_avc ? nalsize : 1)) { |
|
|
|
if (ff_h264_decode_seq_parameter_set(h, 0) >= 0) |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
if (h->is_avc ? nalsize : 1) { |
|
|
|
av_log(h->avctx, AV_LOG_DEBUG, |
|
|
|
av_log(h->avctx, AV_LOG_DEBUG, |
|
|
|
"SPS decoding failure, trying again with the complete NAL\n"); |
|
|
|
"SPS decoding failure, trying again with the complete NAL\n"); |
|
|
|
if (h->is_avc) |
|
|
|
if (h->is_avc) |
|
|
@ -1643,8 +1645,11 @@ again: |
|
|
|
break; |
|
|
|
break; |
|
|
|
init_get_bits(&h->gb, &buf[buf_index + 1 - consumed], |
|
|
|
init_get_bits(&h->gb, &buf[buf_index + 1 - consumed], |
|
|
|
8*(next_avc - buf_index + consumed - 1)); |
|
|
|
8*(next_avc - buf_index + consumed - 1)); |
|
|
|
ff_h264_decode_seq_parameter_set(h); |
|
|
|
if (ff_h264_decode_seq_parameter_set(h, 0) >= 0) |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
init_get_bits(&h->gb, ptr, bit_length); |
|
|
|
|
|
|
|
ff_h264_decode_seq_parameter_set(h, 1); |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
case NAL_PPS: |
|
|
|
case NAL_PPS: |
|
|
|