[libav-commits] h264: Fix parameters to ff_er_add_slice() call

Reinhard Tartler git at libav.org
Sat Jan 12 20:10:22 CET 2013


Module: libav
Branch: release/0.7
Commit: ce8910d861c14a7fcc1c550380e1011a3a3b3e8c

Author:    Reinhard Tartler <siretart at tauware.de>
Committer: Reinhard Tartler <siretart at tauware.de>
Date:      Sat Jan 12 19:22:22 2013 +0100

h264: Fix parameters to ff_er_add_slice() call

s->mb_x is reset to zero a couple of lines above. It does not make
sense to call ff_er_add_slice() with 0 as endx when the end of the
macroblock row was reached. Fixes unnecessary and counterproductive
error resilience in https://bugzilla.libav.org/show_bug.cgi?id=394.

(cherry picked from commit e6160bda98641b7d4f86de15761ad2a962f21a36)

Conflicts:

	libavcodec/h264.c

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

Conflicts:

	libavcodec/h264.c

---

 libavcodec/h264.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index adb01d4..0940335 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3539,7 +3539,9 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
 
                         return 0;
                     }else{
-                        ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)&part_mask);
+                        ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y,
+                                        s->mb_x - 1, s->mb_y,
+                                        (AC_END|DC_END|MV_END)&part_mask);
 
                         return -1;
                     }



More information about the libav-commits mailing list