+2005-08-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
+ * ext/mad/gstmad.c: (gst_mad_init), (gst_mad_chain):
+ It'd be nice if I could listen to my mp3 files, so send out an
+ initial discont, as the sink apparently wants.
+
2005-08-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/avi/gstavidemux.c: (gst_avi_demux_handle_src_event),
mad->framecount = 0;
mad->vbr_average = 0;
mad->vbr_rate = 0;
- mad->restart = FALSE;
+ mad->restart = TRUE;
mad->segment_start = 0;
mad->header.mode = -1;
mad->header.emphasis = -1;
gboolean new_pts = FALSE;
GstClockTime timestamp;
GstFlowReturn result = GST_FLOW_OK;
+ gboolean do_send_discont = FALSE;
mad = GST_MAD (GST_PAD_PARENT (pad));
/* restarts happen on discontinuities, ie. seek, flush, PAUSED to PLAYING */
- if (gst_mad_check_restart (mad))
+ if (gst_mad_check_restart (mad)) {
+ do_send_discont = TRUE;
GST_DEBUG ("mad restarted");
+ }
timestamp = GST_BUFFER_TIMESTAMP (buffer);
GST_DEBUG ("mad in timestamp %" GST_TIME_FORMAT, GST_TIME_ARGS (timestamp));
}
}
+ if (do_send_discont) {
+ gst_pad_push_event (mad->srcpad,
+ gst_event_new_newsegment (1.0, GST_FORMAT_TIME,
+ GST_BUFFER_TIMESTAMP (outbuffer), GST_CLOCK_TIME_NONE, 0));
+ do_send_discont = FALSE;
+ }
result = gst_pad_push (mad->srcpad, outbuffer);
if (result != GST_FLOW_OK) {
goto end;