aboutsummaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorManoj Bonda2020-06-19 12:31:22 +0530
committerJames Almer2020-06-19 11:05:30 -0300
commit23d06f606e58779d47ca9d312c570b8e64f99f9e (patch)
tree083d29d54e0fca0141bbdb0f64c90b3808509c29 /libavcodec
parentaf6cddae1fe9cf378e961d9a2a36dd7234996ab3 (diff)
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: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/av1_parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c
index c5bdc6b25f..036ab5e14e 100644
--- a/libavcodec/av1_parser.c
+++ b/libavcodec/av1_parser.c
@@ -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];