diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-11-19 16:09:38 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-11-19 16:10:55 +0100 |
commit | 59a53cfd364f8d784545fff1f997e8a9baf83ecd (patch) | |
tree | 09d83daa44ad779f893c21758c03d22c20dc1fc0 | |
parent | 9f5adb2ca3620407fbad9ac009b9e3d962c69db6 (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.
-rw-r--r-- | ext/wavpack/gstwavpackparse.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/wavpack/gstwavpackparse.c b/ext/wavpack/gstwavpackparse.c index 1e6aa21f4..fbb933197 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 * |