summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-11-19 16:09:38 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-11-19 16:10:55 +0100
commit59a53cfd364f8d784545fff1f997e8a9baf83ecd (patch)
tree09d83daa44ad779f893c21758c03d22c20dc1fc0 /ext
parent9f5adb2ca3620407fbad9ac009b9e3d962c69db6 (diff)
wavpackparse: After pushing a frame, update last_stop to the end of the frame
This improves position reporting, especially because of the fact that WavPack frames are usually 0.5-1.0 seconds long.
Diffstat (limited to 'ext')
-rw-r--r--ext/wavpack/gstwavpackparse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/wavpack/gstwavpackparse.c b/ext/wavpack/gstwavpackparse.c
index 1e6aa21f..fbb93319 100644
--- a/ext/wavpack/gstwavpackparse.c
+++ b/ext/wavpack/gstwavpackparse.c
@@ -950,6 +950,7 @@ static GstFlowReturn
gst_wavpack_parse_push_buffer (GstWavpackParse * wvparse, GstBuffer * buf,
WavpackHeader * header)
{
+ GstFlowReturn ret;
wvparse->current_offset += header->ckSize + 8;
wvparse->segment.last_stop = header->block_index;
@@ -1007,7 +1008,11 @@ gst_wavpack_parse_push_buffer (GstWavpackParse * wvparse, GstBuffer * buf,
GST_LOG_OBJECT (wvparse, "Pushing buffer with time %" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
- return gst_pad_push (wvparse->srcpad, buf);
+ ret = gst_pad_push (wvparse->srcpad, buf);
+
+ wvparse->segment.last_stop = wvparse->next_block_index;
+
+ return ret;
}
static guint8 *