aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-10-23 18:42:22 +0100
committerMark Thompson <sw@jkqxz.net>2016-10-31 19:23:40 +0000
commit4df6605da7e351116c99f19b8a98e1f236932600 (patch)
treee6c0b2e713cc6cab4677de0f964cfbaa5a4e2e9a
parent5e965582d5129ec1c5cbe67125fff8c96c6ba3c6 (diff)
downloadffmpeg-4df6605da7e351116c99f19b8a98e1f236932600.tar.gz
vc1: Return stream format information from parser
-rw-r--r--libavcodec/vc1_parser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c
index 9ca6154e71..bb54947f55 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,