[FFmpeg-cvslog] h264: Fix parameters to ff_er_add_slice() call

Janne Grunau git at videolan.org
Thu Jan 17 02:04:33 CET 2013


ffmpeg | branch: release/0.10 | Janne Grunau <janne-libav at jannau.net> | Thu Nov 15 16:21:41 2012 +0100| [52adbc0e1793208c604c581c0eeba6fee0606005] | committer: Reinhard Tartler

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>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52adbc0e1793208c604c581c0eeba6fee0606005
---

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

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index d8d0a7d..b866917 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3760,9 +3760,10 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
                         ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END&part_mask);
 
                         return 0;
-                    }else{
-                        ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask);
-
+                    } else {
+                        ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y,
+                                        s->mb_x - 1, s->mb_y,
+                                        ER_MB_END & part_mask);
                         return -1;
                     }
                 }



More information about the ffmpeg-cvslog mailing list