diff --git a/ChangeLog b/ChangeLog index d9692c3fcc..274c528a02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-22 Tim-Philipp Müller + + * ext/mad/gstmad.c: (gst_mad_chain): + Fix seeking even more by sending the newsegment event with the + right parameters. Should fix querying in playbin/totem after + a seek. + 2005-11-22 Tim-Philipp Müller * ext/mad/gstmad.c: (gst_mad_mode_get_type), (gst_mad_src_query), diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c index e1a1cd0b4b..e1d45cc4b1 100644 --- a/ext/mad/gstmad.c +++ b/ext/mad/gstmad.c @@ -1533,14 +1533,19 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer) } if (do_send_discont) { + gint64 start = GST_BUFFER_TIMESTAMP (outbuffer); + + GST_DEBUG ("Sending NEWSEGMENT event, start=%" GST_TIME_FORMAT, + GST_TIME_ARGS (start)); + gst_pad_push_event (mad->srcpad, gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME, - GST_BUFFER_TIMESTAMP (outbuffer), GST_CLOCK_TIME_NONE, 0)); + start, GST_CLOCK_TIME_NONE, start)); do_send_discont = FALSE; } result = gst_pad_push (mad->srcpad, outbuffer); - if (result != GST_FLOW_OK) { + if (result != GST_FLOW_OK && result != GST_FLOW_NOT_LINKED) { goto end; } }