mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 16:52:42 +00:00
oggmux: only clip by duration if end of buffer is ahead of segment
It might happen that the timestamp is before the segment and the check would succeed. In this case reducing the duration makes no sense and would lead to broken results.
This commit is contained in:
parent
8abfdd127f
commit
68fcf7ef52
1 changed files with 2 additions and 1 deletions
|
@ -871,7 +871,8 @@ gst_ogg_mux_decorate_buffer (GstOggMux * ogg_mux, GstOggPadData * pad,
|
|||
*/
|
||||
end_time =
|
||||
gst_ogg_stream_granule_to_time (&pad->map, pad->next_granule + duration);
|
||||
if (!GST_CLOCK_TIME_IS_VALID (gst_segment_to_running_time (&pad->segment,
|
||||
if (end_time > pad->segment.stop
|
||||
&& !GST_CLOCK_TIME_IS_VALID (gst_segment_to_running_time (&pad->segment,
|
||||
GST_FORMAT_TIME, end_time))) {
|
||||
gint64 actual_duration =
|
||||
gst_util_uint64_scale_round (pad->segment.stop - time,
|
||||
|
|
Loading…
Reference in a new issue