summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2010-02-28 18:33:33 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-02-28 18:33:33 +0000
commit7c994c366c311ba7799aef80efaf80e265c0c329 (patch)
treef3d6c53e3027a78f32f17e1ffd965c00ee5a0236 /libavcodec
parent5692ed3ad4b6ce25ce6ffb64a0ce33265623c21c (diff)
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
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 5185e31ebb..034142e234 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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);