On 6/19/2020 4:01 AM, ManojGuptaBonda wrote:
> Initialize avctx->pix_fmt in av1_parser.c
> AV1 Chroma format is invalid when quering using below code:
> iVideoStream = av_find_best_stream(fmtc, AVMEDIA_TYPE_VIDEO, -1, -1, >
> NULL, 0);
> eChromaFormat = (AVPixelFormat)fmtc->streams[iVideoStream]->codecpar->
>> format;
> ---
>  libavcodec/av1_parser.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c
> index 68b7a78abe..16e617ed16 100644
> --- a/libavcodec/av1_parser.c
> +++ b/libavcodec/av1_parser.c
> @@ -164,6 +164,7 @@ static int av1_parser_parse(AVCodecParserContext *ctx,
>          avctx->color_primaries = (enum AVColorPrimaries) 
> color->color_primaries;
>          avctx->color_trc = (enum AVColorTransferCharacteristic) 
> color->transfer_characteristics;
>          avctx->color_range = color->color_range ? AVCOL_RANGE_JPEG : 
> AVCOL_RANGE_MPEG;
> +        avctx->pix_fmt = ctx->format;
>  
>          if (ctx->width != avctx->width || ctx->height != avctx->height) {
>              ret = ff_set_dimensions(avctx, ctx->width, ctx->height);

Applied, thanks.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to