# HG changeset patch # User kostya # Date 1240470842 0 # Node ID 7afd4f44c45021f1248ab13aa6af9e698ffc5a15 # Parent 479e4d86803853d2bce9048f65ac8b7de4776a00 Display dimensions should not affect the real size of coded frame, thus set only avctx->{width,height} and don't touch coded_{width,height} when parsing them. This fixes the case when coded and display dimensions differ by more than one macroblock. diff -r 479e4d868038 -r 7afd4f44c450 vc1.c --- a/vc1.c Wed Apr 22 22:05:34 2009 +0000 +++ b/vc1.c Thu Apr 23 07:14:02 2009 +0000 @@ -975,8 +975,8 @@ if(get_bits1(gb)) { //Display Info - decoding is not affected by it int w, h, ar = 0; av_log(v->s.avctx, AV_LOG_DEBUG, "Display extended info:\n"); - v->s.avctx->coded_width = w = get_bits(gb, 14) + 1; - v->s.avctx->coded_height = h = get_bits(gb, 14) + 1; + v->s.avctx->width = w = get_bits(gb, 14) + 1; + v->s.avctx->height = h = get_bits(gb, 14) + 1; av_log(v->s.avctx, AV_LOG_DEBUG, "Display dimensions: %ix%i\n", w, h); if(get_bits1(gb)) ar = get_bits(gb, 4);