Commit 79757440 authored by Manoj Bonda's avatar Manoj Bonda Committed by James Almer

avcodec/av1_parser: initialize avctx->pix_fmt

Initialize avctx->pix_fmt in av1_parser.c
AV1 Chroma format is invalid when quering using below code if no AV1 decoder
is available:

iVideoStream = av_find_best_stream(fmtc, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);
eChromaFormat = (AVPixelFormat)fmtc->streams[iVideoStream]->codecpar->format;
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
(cherry picked from commit 23d06f606e58779d47ca9d312c570b8e64f99f9e)
parent b303fe92
......@@ -171,6 +171,8 @@ 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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment