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.
This commit is contained in:
Sebastian Dröge 2009-11-19 16:09:38 +01:00
parent 9f5adb2ca3
commit 59a53cfd36

View file

@ -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 *