+2007-05-16 Tim-Philipp Müller <tim at centricular dot net>
+
+ Based on patch by: Mark Nauwelaerts <manauw skynet be>
+
+ * gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_process_event):
+ * gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_class_init),
+ (gst_mpeg_demux_process_event), (gst_mpeg_streams_reset_last_flow):
+ * gst/mpegstream/gstmpegdemux.h:
+ Reset last_flow values for the various streams after a flushing
+ seek, otherwise we might aggregate wrong flow returns afterwards
+ that will make upstream pause silently. This should fix seeking
+ in DVDs and also fix the Thoggen cropping dialog (#438610).
+
2007-05-07 Tim-Philipp Müller <tim at centricular dot net>
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_reset),
dvd_demux->segment_filter = TRUE;
ret = GST_MPEG_PARSE_CLASS (parent_class)->process_event (mpeg_parse,
event);
+
+ /* parent class will have reset the other streams */
+ gst_mpeg_streams_reset_last_flow (dvd_demux->subpicture_stream,
+ GST_DVD_DEMUX_NUM_SUBPICTURE_STREAMS);
break;
case GST_EVENT_CUSTOM_DOWNSTREAM:
case GST_EVENT_CUSTOM_DOWNSTREAM_OOB:
static void gst_mpeg_demux_class_init (GstMPEGDemuxClass * klass);
+static gboolean gst_mpeg_demux_process_event (GstMPEGParse * mpeg_parse,
+ GstEvent * event);
+
static GstPad *gst_mpeg_demux_new_output_pad (GstMPEGDemux * mpeg_demux,
const gchar * name, GstPadTemplate * temp);
static void gst_mpeg_demux_init_stream (GstMPEGDemux * mpeg_demux,
mpeg_parse_class->parse_packet = gst_mpeg_demux_parse_packet;
mpeg_parse_class->parse_pes = gst_mpeg_demux_parse_pes;
mpeg_parse_class->send_buffer = NULL;
+ mpeg_parse_class->process_event = gst_mpeg_demux_process_event;
klass->new_output_pad = gst_mpeg_demux_new_output_pad;
klass->init_stream = gst_mpeg_demux_init_stream;
mpeg_demux->last_pts = -1;
}
+
+static gboolean
+gst_mpeg_demux_process_event (GstMPEGParse * mpeg_parse, GstEvent * event)
+{
+ GstMPEGDemux *demux = GST_MPEG_DEMUX (mpeg_parse);
+ gboolean ret;
+
+ switch (GST_EVENT_TYPE (event)) {
+ case GST_EVENT_FLUSH_STOP:
+ ret = GST_MPEG_PARSE_CLASS (parent_class)->process_event (mpeg_parse,
+ event);
+
+ gst_mpeg_streams_reset_last_flow (demux->video_stream,
+ GST_MPEG_DEMUX_NUM_VIDEO_STREAMS);
+ gst_mpeg_streams_reset_last_flow (demux->audio_stream,
+ GST_MPEG_DEMUX_NUM_AUDIO_STREAMS);
+ gst_mpeg_streams_reset_last_flow (demux->private_stream,
+ GST_MPEG_DEMUX_NUM_PRIVATE_STREAMS);
+ break;
+ default:
+ ret = GST_MPEG_PARSE_CLASS (parent_class)->process_event (mpeg_parse,
+ event);
+ break;
+ }
+
+ return ret;
+}
+
static gint
_demux_get_writer_id (GstIndex * index, GstPad * pad)
{
return mpeg_demux->index;
}
+void
+gst_mpeg_streams_reset_last_flow (GstMPEGStream * streams[], guint num)
+{
+ guint i;
+
+ for (i = 0; i < num; ++i) {
+ if (streams[i] != NULL)
+ streams[i]->last_flow = GST_FLOW_OK;
+ }
+}
gboolean
gst_mpeg_demux_plugin_init (GstPlugin * plugin)