avviddec: After draining frames, flush the libav decoder
authorJan Schmidt <jan@centricular.com>
Fri, 8 Aug 2014 10:04:20 +0000 (20:04 +1000)
committerJan Schmidt <jan@centricular.com>
Tue, 12 Aug 2014 12:48:59 +0000 (22:48 +1000)
Makes sure that there's really nothing stale left in the decoder
after draining.

https://bugzilla.gnome.org/show_bug.cgi?id=734661

ext/libav/gstavviddec.c

index 3db0be1..a93f3d4 100644 (file)
@@ -1451,6 +1451,7 @@ gst_ffmpegviddec_drain (GstFFMpegVidDec * ffmpegdec)
       if (len < 0 || have_data == 0)
         break;
     } while (try++ < 10);
+    avcodec_flush_buffers (ffmpegdec->context);
   }
 }