]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/av1_parser.c
avcodec/Makefile: add missing vorbis_data dependency to opus encoder
[ffmpeg] / libavcodec / av1_parser.c
index 8df66498f4d61cd2a60c4d21e2c2db34d9145d79..b916608d65c77c9f6aac4704b97f1a35270bc733 100644 (file)
@@ -68,11 +68,10 @@ 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_uninit(s->cbc, td);
+        ff_cbs_fragment_reset(s->cbc, td);
     }
 
     ret = ff_cbs_read(s->cbc, td, data, size);
@@ -159,7 +158,7 @@ static int av1_parser_parse(AVCodecParserContext *ctx,
     }
 
 end:
-    ff_cbs_fragment_uninit(s->cbc, td);
+    ff_cbs_fragment_reset(s->cbc, td);
 
     s->cbc->log_ctx = NULL;
 
@@ -193,6 +192,7 @@ static void av1_parser_close(AVCodecParserContext *ctx)
 {
     AV1ParseContext *s = ctx->priv_data;
 
+    ff_cbs_fragment_free(s->cbc, &s->temporal_unit);
     ff_cbs_close(&s->cbc);
 }