Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-10-23 20:42:22 +0300
committerMark Thompson <sw@jkqxz.net>2016-10-31 22:23:40 +0300
commit4df6605da7e351116c99f19b8a98e1f236932600 (patch)
treee6c0b2e713cc6cab4677de0f964cfbaa5a4e2e9a /libavcodec/vc1_parser.c
parent5e965582d5129ec1c5cbe67125fff8c96c6ba3c6 (diff)
vc1: Return stream format information from parser
Diffstat (limited to 'libavcodec/vc1_parser.c')
-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,