]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/av1_parser: don't abort parsing the first frame if extradata parsing fails
authorJames Almer <jamrial@gmail.com>
Sun, 24 Mar 2019 21:22:32 +0000 (18:22 -0300)
committerJames Almer <jamrial@gmail.com>
Sun, 24 Mar 2019 21:26:49 +0000 (18:26 -0300)
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>
libavcodec/av1_parser.c

index bb8737a393ad5d3cdb9e346a5bb7927e5e5e6694..b916608d65c77c9f6aac4704b97f1a35270bc733 100644 (file)
@@ -68,8 +68,7 @@ static int av1_parser_parse(AVCodecParserContext *ctx,
 
         ret = ff_cbs_read(s->cbc, td, avctx->extradata, avctx->extradata_size);
         if (ret < 0) {
-            av_log(avctx, AV_LOG_ERROR, "Failed to parse extradata.\n");
-            goto end;
+            av_log(avctx, AV_LOG_WARNING, "Failed to parse extradata.\n");
         }
 
         ff_cbs_fragment_reset(s->cbc, td);