ducatividdec: flush the codec going to READY
authorAlessandro Decina <alessandro.decina@collabora.co.uk>
Thu, 2 Feb 2012 10:39:20 +0000 (11:39 +0100)
committerAlessandro Decina <alessandro.decina@collabora.co.uk>
Thu, 2 Feb 2012 10:39:20 +0000 (11:39 +0100)
Flush the codec going to READY so we don't leak buffers if state is changed to
<= READY before EOS.

src/gstducatividdec.c

index cde050c15b36cd1f93dd3ef41270575d262ca1d7..d7c00dbf0976655419e5ba38b31d58c26c8c98bd 100644 (file)
@@ -1047,6 +1047,7 @@ gst_ducati_viddec_change_state (GstElement * element, GstStateChange transition)
   switch (transition) {
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       self->interlaced = FALSE;
+      codec_flush (self, FALSE);
       break;
     case GST_STATE_CHANGE_READY_TO_NULL:
       codec_delete (self);