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

stefano subversion
Fri Mar 19 00:36:55 CET 2010


Author: stefano
Date: Fri Mar 19 00:36:54 2010
New Revision: 22597

Log:
Reinitialize the h264 decoder context on every valid aspect ratio
change, not only size changes.

Patch by Janusz Krzysztofik foo=zyszt <jkr$foo at tis.icnet.pl>.

Modified:
   trunk/libavcodec/h264.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	Fri Mar 19 00:13:04 2010	(r22596)
+++ trunk/libavcodec/h264.c	Fri Mar 19 00:36:54 2010	(r22597)
@@ -1774,7 +1774,8 @@ 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
+            || av_cmp_q(h->sps.sar, s->avctx->sample_aspect_ratio))) {
         if(h != h0)
             return -1;   // width / height changed during parallelized decoding
         free_tables(h);



More information about the ffmpeg-cvslog mailing list