1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Process picture aspect ratio changes in H.264.

This fixes playback of such streams with ffplay (but does not affect
current ffmpeg).

Patch by Janusz Krzysztofik, jkrzyszt A tis D icnet D pl

Originally committed as revision 22112 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Janusz Krzysztofik 2010-02-28 18:33:33 +00:00 committed by Carl Eugen Hoyos
parent 5692ed3ad4
commit 7c994c366c

View File

@ -1775,7 +1775,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
s->height= 16*s->mb_height - 4*FFMIN(h->sps.crop_bottom, 3);
if (s->context_initialized
&& ( s->width != s->avctx->width || s->height != s->avctx->height)) {
&& ( s->width != s->avctx->width || s->height != s->avctx->height
|| h->sps.sar.num != s->avctx->sample_aspect_ratio.num
|| h->sps.sar.den != s->avctx->sample_aspect_ratio.den)) {
if(h != h0)
return -1; // width / height changed during parallelized decoding
free_tables(h);