mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/av1_parser: don't abort parsing the first frame if extradata parsing fails
The first frame contains the sequence header, which is needed to parse every following frame. This fixes parsing streams with broken extradata but correct packet data. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
013f71497b
commit
699d0c2a30
|
@ -68,8 +68,7 @@ static int av1_parser_parse(AVCodecParserContext *ctx,
|
||||||
|
|
||||||
ret = ff_cbs_read(s->cbc, td, avctx->extradata, avctx->extradata_size);
|
ret = ff_cbs_read(s->cbc, td, avctx->extradata, avctx->extradata_size);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Failed to parse extradata.\n");
|
av_log(avctx, AV_LOG_WARNING, "Failed to parse extradata.\n");
|
||||||
goto end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ff_cbs_fragment_reset(s->cbc, td);
|
ff_cbs_fragment_reset(s->cbc, td);
|
||||||
|
|
Loading…
Reference in New Issue