ext/vorbis/vorbisdec.c: Take the current timestamp instead of timestamp+duration for the offset.

Original commit message from CVS:
* ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet):
Take the current timestamp instead of timestamp+duration for the offset.
This offset will later be used for calculating the timestamp and
otherwise vorbisdec will interpolate timestamps wrong if upstream
only sends timestamps and no granulepos.
This commit is contained in:
Sebastian Dröge 2008-08-21 14:19:21 +00:00
parent ca5d4c1fcb
commit 58584b9b0b
3 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2008-08-21 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet):
Take the current timestamp instead of timestamp+duration for the offset.
This offset will later be used for calculating the timestamp and
otherwise vorbisdec will interpolate timestamps wrong if upstream
only sends timestamps and no granulepos.
2008-08-21 Stefan Kost <ensonic@users.sf.net>
* tests/examples/seek/seek.c:

2
common

@ -1 +1 @@
Subproject commit d70ca17ae6fbe6020996e4567275d5e14972ed45
Subproject commit 8d494854a6018336a80ece82ceb3df0033e2da9c

View file

@ -1017,8 +1017,7 @@ vorbis_handle_data_packet (GstVorbisDec * vd, ogg_packet * packet)
GST_TIME_ARGS (GST_BUFFER_DURATION (out)),
GST_TIME_ARGS (vd->cur_timestamp + GST_BUFFER_DURATION (out)));
vd->cur_timestamp += GST_BUFFER_DURATION (out);
GST_BUFFER_OFFSET (out) = GST_CLOCK_TIME_TO_FRAMES (vd->cur_timestamp,
vd->vi.rate);
GST_BUFFER_OFFSET (out) = GST_CLOCK_TIME_TO_FRAMES (timestamp, vd->vi.rate);
GST_BUFFER_OFFSET_END (out) = GST_BUFFER_OFFSET (out) + sample_count;
} else {
/* we have incoming granulepos */