mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
vorbisdec: avoid using invalid timestamps
This commit is contained in:
parent
8945ce0958
commit
eac243bc01
1 changed files with 2 additions and 2 deletions
|
@ -827,7 +827,7 @@ vorbis_do_timestamps (GstVorbisDec * vd, GstBuffer * buf, gboolean reverse,
|
|||
GstClockTime timestamp, GstClockTime duration)
|
||||
{
|
||||
/* interpolate reverse */
|
||||
if (vd->last_timestamp != -1 && reverse)
|
||||
if (vd->last_timestamp != -1 && duration != -1 && reverse)
|
||||
vd->last_timestamp -= duration;
|
||||
|
||||
/* take buffer timestamp, use interpolated timestamp otherwise */
|
||||
|
@ -837,7 +837,7 @@ vorbis_do_timestamps (GstVorbisDec * vd, GstBuffer * buf, gboolean reverse,
|
|||
timestamp = vd->last_timestamp;
|
||||
|
||||
/* interpolate forwards */
|
||||
if (vd->last_timestamp != -1 && !reverse)
|
||||
if (vd->last_timestamp != -1 && duration != -1 && !reverse)
|
||||
vd->last_timestamp += duration;
|
||||
|
||||
GST_BUFFER_TIMESTAMP (buf) = timestamp;
|
||||
|
|
Loading…
Reference in a new issue