mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
theoradec: Use GST_CLOCK_TIME_NONE for invalid positions. Fixes #543591
The problem was that previously we didn't check whether _theora_granule_frame returned a negative framecount or not, resulting in bogus timestamps.
This commit is contained in:
parent
9f0e053f6e
commit
b7fdb7c6d7
1 changed files with 3 additions and 2 deletions
|
@ -249,10 +249,11 @@ _theora_granule_start_time (GstTheoraDec * dec, gint64 granulepos)
|
|||
|
||||
/* invalid granule results in invalid time */
|
||||
if (granulepos == -1)
|
||||
return -1;
|
||||
return GST_CLOCK_TIME_NONE;
|
||||
|
||||
/* get framecount */
|
||||
framecount = _theora_granule_frame (dec, granulepos);
|
||||
if ((framecount = _theora_granule_frame (dec, granulepos)) < 0)
|
||||
return GST_CLOCK_TIME_NONE;
|
||||
|
||||
return gst_util_uint64_scale_int (framecount * GST_SECOND,
|
||||
dec->info.fps_denominator, dec->info.fps_numerator);
|
||||
|
|
Loading…
Reference in a new issue