Imported Debian version 2.5.0~trusty1.1
[deb_ffmpeg.git] / ffmpeg / libavcodec / error_resilience.c
index 2ba4a68a98eea06b5f272bddd6779b0b341ae06c..c72c562078d0b538435144952fc6b8339ba73914 100644 (file)
@@ -448,7 +448,7 @@ static void guess_mv(ERContext *s)
                     int best_score         = 256 * 256 * 256 * 64;
                     int best_pred          = 0;
                     const int mot_index    = (mb_x + mb_y * mot_stride) * mot_step;
-                    int prev_x, prev_y, prev_ref;
+                    int prev_x = 0, prev_y = 0, prev_ref = 0;
 
                     if ((mb_x ^ mb_y ^ pass) & 1)
                         continue;
@@ -858,7 +858,7 @@ void ff_er_add_slice(ERContext *s, int startx, int starty,
 
 void ff_er_frame_end(ERContext *s)
 {
-    int *linesize = s->cur_pic.f->linesize;
+    int *linesize = NULL;
     int i, mb_x, mb_y, error, error_type, dc_error, mv_error, ac_error;
     int distance;
     int threshold_part[4] = { 100, 100, 100 };
@@ -875,6 +875,7 @@ void ff_er_frame_end(ERContext *s)
                           (s->avctx->skip_top + s->avctx->skip_bottom)) {
         return;
     }
+    linesize = s->cur_pic.f->linesize;
     for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
         int status = s->error_status_table[mb_x + (s->mb_height - 1) * s->mb_stride];
         if (status != 0x7F)