diff options
author | Mark Thompson <sw@jkqxz.net> | 2016-10-26 21:13:45 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2016-11-14 19:38:19 +0000 |
commit | fea4dc05b41f5465bedc786b67966f204ec6150c (patch) | |
tree | 32a3fe8a468c2ad5677d870f251963029388625f | |
parent | 0940b748bdba36c4894fc8ea6be631d821fdf578 (diff) | |
download | ffmpeg-fea4dc05b41f5465bedc786b67966f204ec6150c.tar.gz |
vc1: Return stream format information from parser
-rw-r--r-- | libavcodec/vc1_parser.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index 38b62f72bd..7234db69ae 100644 --- a/libavcodec/vc1_parser.c +++ b/libavcodec/vc1_parser.c @@ -108,6 +108,14 @@ static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx, break; } + 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, |