Commit 946f3b79 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

ext/flac/gstflacdec.c: Post SEGMENT_DONE message in TIME format.

Original commit message from CVS:
* ext/flac/gstflacdec.c: (gst_flac_dec_loop):
Post SEGMENT_DONE message in TIME format.
parent 6470f4c5
2006-04-20 Tim-Philipp Müller <tim at centricular dot net>
* ext/flac/gstflacdec.c: (gst_flac_dec_loop):
Post SEGMENT_DONE message in TIME format.
2006-04-20 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Fabrizio Gennari <fabrizio dot ge at tiscali dot it>
......
......@@ -791,15 +791,21 @@ analyze_state:
if (flacdec->segment.stop != -1 &&
flacdec->segment.last_stop > 0 &&
flacdec->segment.last_stop >= flacdec->segment.stop) {
gint64 stop_time;
GST_DEBUG_OBJECT (flacdec, "reached end of the configured segment");
if ((flacdec->segment.flags & GST_SEEK_FLAG_SEGMENT) == 0)
goto eos_and_pause;
GST_DEBUG_OBJECT (flacdec, "posting SEGMENT_DONE message");
stop_time = gst_util_uint64_scale_int (flacdec->segment.stop,
GST_SECOND, flacdec->sample_rate);
gst_element_post_message (GST_ELEMENT (flacdec),
gst_message_new_segment_done (GST_OBJECT (flacdec),
GST_FORMAT_DEFAULT, flacdec->segment.stop));
GST_FORMAT_TIME, stop_time));
goto pause;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment