mirror of https://git.ffmpeg.org/ffmpeg.git
h264dec: do not abort if decoding extradata fails
Such errors are not necessarily fatal and decoding might still be possible, e.g. it happens for MVC streams where we do not handle the subset SPS thus failing to parse its corresponding PPS.
This commit is contained in:
parent
9d6785d426
commit
d41faffb53
|
@ -414,10 +414,16 @@ static av_cold int h264_decode_init(AVCodecContext *avctx)
|
||||||
ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size,
|
ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size,
|
||||||
&h->ps, &h->is_avc, &h->nal_length_size,
|
&h->ps, &h->is_avc, &h->nal_length_size,
|
||||||
avctx->err_recognition, avctx);
|
avctx->err_recognition, avctx);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
h264_decode_end(avctx);
|
int explode = avctx->err_recognition & AV_EF_EXPLODE;
|
||||||
return ret;
|
av_log(avctx, explode ? AV_LOG_ERROR: AV_LOG_WARNING,
|
||||||
}
|
"Error decoding the extradata\n");
|
||||||
|
if (explode) {
|
||||||
|
h264_decode_end(avctx);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue