Message ID | 20200619070122.3391-1-mbonda@nvidia.com |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel] initialize avctx->pix_fmt in av1 parser. | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
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.
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);
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(+)