[FFmpeg-devel] [PATCH] Fix VC-1 width/height handling.

Michael Niedermayer michaelni at gmx.at
Tue Aug 16 04:13:31 CEST 2011


On Sat, Aug 13, 2011 at 11:56:20AM +0200, Reimar Döffinger wrote:
> 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 at gmx.de>
> ---
>  libavcodec/vc1.c    |   31 +++++++++++++++++--------------
>  libavcodec/vc1dec.c |   10 ++++------
>  2 files changed, 21 insertions(+), 20 deletions(-)

should be ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110816/2c2468b4/attachment.asc>


More information about the ffmpeg-devel mailing list