Return early if a HW accelerator is used.
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Fri, 27 Feb 2009 08:16:22 +0000 (08:16 +0000)
committerBenoit Fouet <benoit.fouet@free.fr>
Fri, 27 Feb 2009 08:16:22 +0000 (08:16 +0000)
Patch by Gwenole Beauchesne.

Originally committed as revision 17635 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/error_resilience.c

index c21bc70..6e0bd2c 100644 (file)
@@ -621,6 +621,9 @@ void ff_er_add_slice(MpegEncContext *s, int startx, int starty, int endx, int en
     const int end_xy  = s->mb_index2xy[end_i];
     int mask= -1;
 
+    if(s->avctx->hwaccel)
+        return;
+
     if(start_i > end_i || start_xy > end_xy){
         av_log(s->avctx, AV_LOG_ERROR, "internal error, slice end before start\n");
         return;