mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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:
parent
9f5adb2ca3
commit
59a53cfd36
1 changed files with 6 additions and 1 deletions
|
@ -950,6 +950,7 @@ static GstFlowReturn
|
||||||
gst_wavpack_parse_push_buffer (GstWavpackParse * wvparse, GstBuffer * buf,
|
gst_wavpack_parse_push_buffer (GstWavpackParse * wvparse, GstBuffer * buf,
|
||||||
WavpackHeader * header)
|
WavpackHeader * header)
|
||||||
{
|
{
|
||||||
|
GstFlowReturn ret;
|
||||||
wvparse->current_offset += header->ckSize + 8;
|
wvparse->current_offset += header->ckSize + 8;
|
||||||
|
|
||||||
wvparse->segment.last_stop = header->block_index;
|
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_LOG_OBJECT (wvparse, "Pushing buffer with time %" GST_TIME_FORMAT,
|
||||||
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
|
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 *
|
static guint8 *
|
||||||
|
|
Loading…
Reference in a new issue