OSDN Git Service

Fix VC-1 width/height handling.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 13 Aug 2011 09:32:10 +0000 (11:32 +0200)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Tue, 16 Aug 2011 21:07:25 +0000 (23:07 +0200)
commit4f00519d9508e07aac58a00a9b514dae8ad95723
tree389556b9ed992e87d2c6bcc0b59a181d72bb242a
parent86ca51acb089e74d9b86dfbb25dce2c6b3568047
Fix VC-1 width/height handling.

avcodec_set_dimensions should be used for size changes to ensure
compatibility with future changes.
avctx->width/avctx->height may not be set to display-only dimensions.
Even more so since vc1dec.c would later set coded_width/height based
on this.
coded_width/coded_height should be used instead of width/height for
decoder setup.
This fixes playback of e.g. zz-mcr-nsqr.vc1 sample (containing
display width/height settings) in MPlayer and should fix a crash
with MPC: http://forum.doom9.org/showthread.php?t=162221.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libavcodec/vc1.c
libavcodec/vc1dec.c