deinterlace: Flush QoS and history before applying segment
authorJan Schmidt <thaytan@noraisin.net>
Fri, 12 Nov 2010 12:59:06 +0000 (23:59 +1100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 12 Nov 2010 13:21:09 +0000 (13:21 +0000)
When handling newsegment, flush out the buffer history in the
existing segment, not the new one. Fixes playback in some DVD
cases.

Partially fixes #633294

gst/deinterlace/gstdeinterlace.c

index fdf8615..2a9f420 100644 (file)
@@ -1492,6 +1492,10 @@ gst_deinterlace_sink_event (GstPad * pad, GstEvent * event)
 
       gst_event_parse_new_segment_full (event, &is_update, &rate, &applied_rate,
           &fmt, &start, &end, &base);
+
+      gst_deinterlace_reset_qos (self);
+      gst_deinterlace_reset_history (self, FALSE);
+
       if (fmt == GST_FORMAT_TIME) {
         GST_DEBUG_OBJECT (pad,
             "Got NEWSEGMENT event in GST_FORMAT_TIME, passing on (%"
@@ -1503,8 +1507,6 @@ gst_deinterlace_sink_event (GstPad * pad, GstEvent * event)
         gst_segment_init (&self->segment, GST_FORMAT_UNDEFINED);
       }
 
-      gst_deinterlace_reset_qos (self);
-      gst_deinterlace_reset_history (self, FALSE);
       res = gst_pad_push_event (self->srcpad, event);
       break;
     }