[FFmpeg-cvslog] r20646 - trunk/libavcodec/mpeg12.c

michael subversion
Sun Nov 29 02:50:43 CET 2009


Author: michael
Date: Sun Nov 29 02:50:43 2009
New Revision: 20646

Log:
Make sure field_select is not set to nonsensical values even if unused.
Fixed an assert failure.

Modified:
   trunk/libavcodec/mpeg12.c

Modified: trunk/libavcodec/mpeg12.c
==============================================================================
--- trunk/libavcodec/mpeg12.c	Sun Nov 29 00:17:46 2009	(r20645)
+++ trunk/libavcodec/mpeg12.c	Sun Nov 29 02:50:43 2009	(r20646)
@@ -1847,7 +1847,7 @@ static int mpeg_decode_slice(Mpeg1Contex
                     s->mv[0][0][0] = s->mv[0][0][1] = 0;
                     s->last_mv[0][0][0] = s->last_mv[0][0][1] = 0;
                     s->last_mv[0][1][0] = s->last_mv[0][1][1] = 0;
-                    s->field_select[0][0]= s->picture_structure - 1;
+                    s->field_select[0][0]= (s->picture_structure - 1) & 1;
                 } else {
                     /* if B type, reuse previous vectors and directions */
                     s->mv[0][0][0] = s->last_mv[0][0][0];



More information about the ffmpeg-cvslog mailing list