]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/av1_parser.c
avcodec/mpegaudiodec_template: Avoid VLC size tables
[ffmpeg] / libavcodec / av1_parser.c
index ab23195e85951748558f5bb46b386f45be24599c..181ff3a1be789f9ae14fa14529cb0c10dd6c457d 100644 (file)
@@ -73,7 +73,7 @@ static int av1_parser_parse(AVCodecParserContext *ctx,
     if (avctx->extradata_size && !s->parsed_extradata) {
         s->parsed_extradata = 1;
 
-        ret = ff_cbs_read(s->cbc, td, avctx->extradata, avctx->extradata_size);
+        ret = ff_cbs_read_extradata_from_codec(s->cbc, td, avctx);
         if (ret < 0) {
             av_log(avctx, AV_LOG_WARNING, "Failed to parse extradata.\n");
         }
@@ -155,8 +155,6 @@ static int av1_parser_parse(AVCodecParserContext *ctx,
         color->transfer_characteristics  == AVCOL_TRC_IEC61966_2_1)
         ctx->format = pix_fmts_rgb[color->high_bitdepth + color->twelve_bit];
 
-    avctx->pix_fmt = ctx->format;
-
     avctx->profile = seq->seq_profile;
     avctx->level   = seq->seq_level_idx[0];
 
@@ -165,12 +163,6 @@ static int av1_parser_parse(AVCodecParserContext *ctx,
     avctx->color_trc = (enum AVColorTransferCharacteristic) color->transfer_characteristics;
     avctx->color_range = color->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
 
-    if (ctx->width != avctx->width || ctx->height != avctx->height) {
-        ret = ff_set_dimensions(avctx, ctx->width, ctx->height);
-        if (ret < 0)
-            goto end;
-    }
-
     if (avctx->framerate.num)
         avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1}));