[SCM] libav/experimental: Make sure field_select is not set to nonsensical values even if unused. Fixed an assert failure.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:55:04 UTC 2013


The following commit has been merged in the experimental branch:
commit 9d13016690a6e299aa8289550225df84f4a7fa30
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sun Nov 29 01:50:43 2009 +0000

    Make sure field_select is not set to nonsensical values even if unused.
    Fixed an assert failure.
    
    Originally committed as revision 20646 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index b48d626..196930c 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1847,7 +1847,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
                     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];

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list