Commit b7fdb7c6 authored by Edward Hervey's avatar Edward Hervey 🤘
Browse files

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.
parent 9f0e053f
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment