]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/error_resilience: wait for previous frame to be available
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 18 Mar 2016 01:11:55 +0000 (02:11 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 18 Mar 2016 02:10:16 +0000 (03:10 +0100)
This is possibly redundant but its more correct

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/error_resilience.c

index 5a75faddf560a28bf41a8b923b25b9eba825f99c..8bd215263fe48ff78ca20a1f0e0d059e71f75891 100644 (file)
@@ -393,6 +393,8 @@ static void guess_mv(ERContext *s)
     set_mv_strides(s, &mot_step, &mot_stride);
 
     num_avail = 0;
+    if (s->last_pic.motion_val[0])
+        ff_thread_await_progress(s->last_pic.tf, mb_height-1, 0);
     for (i = 0; i < mb_width * mb_height; i++) {
         const int mb_xy = s->mb_index2xy[i];
         int f = 0;