|
|
|
@@ -713,6 +713,14 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size) |
|
|
|
break; |
|
|
|
case H264_NAL_SPS: { |
|
|
|
GetBitContext tmp_gb = nal->gb; |
|
|
|
if (avctx->hwaccel && avctx->hwaccel->decode_params) { |
|
|
|
ret = avctx->hwaccel->decode_params(avctx, |
|
|
|
nal->type, |
|
|
|
nal->raw_data, |
|
|
|
nal->raw_size); |
|
|
|
if (ret < 0) |
|
|
|
goto end; |
|
|
|
} |
|
|
|
if (ff_h264_decode_seq_parameter_set(&tmp_gb, avctx, &h->ps, 0) >= 0) |
|
|
|
break; |
|
|
|
av_log(h->avctx, AV_LOG_DEBUG, |
|
|
|
@@ -724,6 +732,14 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size) |
|
|
|
break; |
|
|
|
} |
|
|
|
case H264_NAL_PPS: |
|
|
|
if (avctx->hwaccel && avctx->hwaccel->decode_params) { |
|
|
|
ret = avctx->hwaccel->decode_params(avctx, |
|
|
|
nal->type, |
|
|
|
nal->raw_data, |
|
|
|
nal->raw_size); |
|
|
|
if (ret < 0) |
|
|
|
goto end; |
|
|
|
} |
|
|
|
ret = ff_h264_decode_picture_parameter_set(&nal->gb, avctx, &h->ps, |
|
|
|
nal->size_bits); |
|
|
|
if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE)) |
|
|
|
|