summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-05-02 16:19:58 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-05-02 16:19:58 +0000
commit3d4f86374536fa65311390779ebffbeb7dd158ba (patch)
treeb3f085b49853fd6b58a377a5dce1984639460336 /ext
parent405a00c2ce669d7d195ec54496605ba50f9f57c4 (diff)
downloadgst-plugins-bad-3d4f86374536fa65311390779ebffbeb7dd158ba.tar.gz
gst-plugins-bad-3d4f86374536fa65311390779ebffbeb7dd158ba.tar.bz2
gst-plugins-bad-3d4f86374536fa65311390779ebffbeb7dd158ba.zip
ext/wavpack/gstwavpackparse.c: Add handling for segment seeks.
Original commit message from CVS: * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_loop): Add handling for segment seeks.
Diffstat (limited to 'ext')
-rw-r--r--ext/wavpack/gstwavpackparse.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/ext/wavpack/gstwavpackparse.c b/ext/wavpack/gstwavpackparse.c
index 2770e0d6..65cdcf33 100644
--- a/ext/wavpack/gstwavpackparse.c
+++ b/ext/wavpack/gstwavpackparse.c
@@ -1014,15 +1014,29 @@ pause:
gst_pad_pause_task (parse->sinkpad);
if (GST_FLOW_IS_FATAL (flow_ret) || flow_ret == GST_FLOW_NOT_LINKED) {
- if (flow_ret == GST_FLOW_UNEXPECTED) {
- GST_LOG_OBJECT (parse, "Sending EOS, at end of stream");
+ if (flow_ret == GST_FLOW_UNEXPECTED && parse->srcpad) {
+ if (parse->segment.flags & GST_SEEK_FLAG_SEGMENT) {
+ GstClockTime stop;
+
+ GST_LOG_OBJECT (parse, "Sending segment done");
+
+ if ((stop = parse->segment.stop) == -1)
+ stop = parse->segment.duration;
+
+ gst_element_post_message (GST_ELEMENT_CAST (parse),
+ gst_message_new_segment_done (GST_OBJECT_CAST (parse),
+ parse->segment.format, stop));
+ } else {
+ GST_LOG_OBJECT (parse, "Sending EOS, at end of stream");
+ gst_pad_push_event (parse->srcpad, gst_event_new_eos ());
+ }
} else {
GST_ELEMENT_ERROR (parse, STREAM, FAILED,
(_("Internal data stream error.")),
("stream stopped, reason %s", reason));
+ if (parse->srcpad)
+ gst_pad_push_event (parse->srcpad, gst_event_new_eos ());
}
- if (parse->srcpad)
- gst_pad_push_event (parse->srcpad, gst_event_new_eos ());
}
return;
}