vd_ffmpeg: fix aspect ratio problems with recent FFmpeg
commit96312757c5d02d663b4d56471cd7b00e0066318f
authorUoti Urpala <uau@glyph.nonexistent.invalid>
Sat, 16 Oct 2010 01:49:44 +0000 (16 04:49 +0300)
committerUoti Urpala <uau@glyph.nonexistent.invalid>
Sat, 16 Oct 2010 02:14:25 +0000 (16 05:14 +0300)
tree40cc37f448291c6173cea6d53ba5fcf049ae4d7d
parent266e0341bafc90b199fa7674a5044ba85428f5bf
vd_ffmpeg: fix aspect ratio problems with recent FFmpeg

The code left ctx->last_sample_aspect_ratio at 0/0 when allocating a
context. In older FFmpeg versions av_cmp_q() against 0/0 always said
the numbers are equal; but this changed recently, triggering incorrect
overwrite of container aspect ratio. The logic looks like it'd need
further fixes, but for now just initialize last_sample_aspect_ratio to
0/1; this should restore the previous behavior from before FFmpeg
changes, which worked well enough for the most common cases.
libmpcodecs/vd_ffmpeg.c