[FFmpeg-cvslog] r22112 - trunk/libavcodec/h264.c

cehoyos subversion
Sun Feb 28 19:33:33 CET 2010


Author: cehoyos
Date: Sun Feb 28 19:33:33 2010
New Revision: 22112

Log:
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

Modified:
   trunk/libavcodec/h264.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	Sun Feb 28 17:40:17 2010	(r22111)
+++ trunk/libavcodec/h264.c	Sun Feb 28 19:33:33 2010	(r22112)
@@ -1775,7 +1775,9 @@ static int decode_slice_header(H264Conte
         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);



More information about the ffmpeg-cvslog mailing list