Commit 034ec4de authored by kostya's avatar kostya

Set aspect ratio if present (for AP only)

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7720 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 5f2b402b
...@@ -1296,12 +1296,14 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) ...@@ -1296,12 +1296,14 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
w = get_bits(gb, 14) + 1; w = get_bits(gb, 14) + 1;
h = get_bits(gb, 14) + 1; h = get_bits(gb, 14) + 1;
av_log(v->s.avctx, AV_LOG_INFO, "Display dimensions: %ix%i\n", w, h); av_log(v->s.avctx, AV_LOG_INFO, "Display dimensions: %ix%i\n", w, h);
//TODO: store aspect ratio in AVCodecContext
if(get_bits1(gb)) if(get_bits1(gb))
ar = get_bits(gb, 4); ar = get_bits(gb, 4);
if(ar == 15) { if(ar && ar < 14){
v->s.avctx->sample_aspect_ratio = vc1_pixel_aspect[ar];
}else if(ar == 15){
w = get_bits(gb, 8); w = get_bits(gb, 8);
h = get_bits(gb, 8); h = get_bits(gb, 8);
v->s.avctx->sample_aspect_ratio = (AVRational){w, h};
} }
if(get_bits1(gb)){ //framerate stuff if(get_bits1(gb)){ //framerate stuff
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment