X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvc1_parser.c;h=bb54947f559b043c546726697c26c4350554e5bb;hb=ffdc5d09e498bee8176c9e35df101c01c546a738;hp=9ca6154e71a3c4a06b8ccba8384727570a91e941;hpb=9aa3023672b3336968cbdb5c4a733b6088ad564e;p=ffmpeg diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index 9ca6154e71a..bb54947f559 100644 --- a/libavcodec/vc1_parser.c +++ b/libavcodec/vc1_parser.c @@ -115,6 +115,14 @@ static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx, } if (avctx->framerate.num) avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1})); + s->format = vpc->v.chromaformat == 1 ? AV_PIX_FMT_YUV420P + : AV_PIX_FMT_NONE; + if (avctx->width && avctx->height) { + s->width = avctx->width; + s->height = avctx->height; + s->coded_width = FFALIGN(avctx->coded_width, 16); + s->coded_height = FFALIGN(avctx->coded_height, 16); + } } static int vc1_parse(AVCodecParserContext *s,