From c9aab8a123c0bcf6adeab390db1ec783326456ca Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 6 Oct 2011 22:54:00 +0200 Subject: [PATCH 1/2] h264: use mbaff ref indices in fill_colmap() only for mbaff references Prevents writing beyond array bounds. Signed-off-by: Janne Grunau --- libavcodec/h264_direct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index cc6e01861f..fc429aee80 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -89,7 +89,8 @@ static void fill_colmap(H264Context *h, int map[2][16+32], int list, int field, for(j=start; jref_list[0][j].frame_num + (h->ref_list[0][j].f.reference & 3) == poc) { int cur_ref= mbafi ? (j-16)^field : j; - map[list][2*old_ref + (rfield^field) + 16] = cur_ref; + if (ref1->mbaff) + map[list][2 * old_ref + (rfield^field) + 16] = cur_ref; if(rfield == field || !interl) map[list][old_ref] = cur_ref; break; From ea061af15ac5629dc8dbeb33b7382d6711a323c3 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 2 Dec 2012 23:32:41 +0100 Subject: [PATCH 2/2] configure: formatting cosmetics --- configure | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 882f43c462..08f1d82af5 100755 --- a/configure +++ b/configure @@ -1967,13 +1967,17 @@ do_random(){ for opt do optval="${opt#*=}" case "$opt" in - --extra-ldflags=*) add_ldflags $optval + --extra-ldflags=*) + add_ldflags $optval ;; - --extra-libs=*) add_extralibs $optval + --extra-libs=*) + add_extralibs $optval ;; - --disable-devices) disable $INDEV_LIST $OUTDEV_LIST + --disable-devices) + disable $INDEV_LIST $OUTDEV_LIST ;; - --enable-debug=*) debuglevel="$optval" + --enable-debug=*) + debuglevel="$optval" ;; --disable-programs) disable $PROGRAM_LIST