mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
qtmux: Don't write invalid edit list start time.
Avoid writing a negative number as a large positive integer in an edit list when the first_ts is smaller than the first_dts - which can happen when the first packet received has a PTS but no DTS. https://bugzilla.gnome.org/show_bug.cgi?id=759615
This commit is contained in:
parent
675a4088e5
commit
774a32ff89
1 changed files with 4 additions and 2 deletions
|
@ -2481,10 +2481,12 @@ gst_qt_mux_update_edit_lists (GstQTMux * qtmux)
|
|||
|
||||
/* has shift */
|
||||
if (has_gap || (qtpad->dts_adjustment > 0)) {
|
||||
GstClockTime ctts;
|
||||
GstClockTime ctts = 0;
|
||||
guint32 media_start;
|
||||
|
||||
if (qtpad->first_ts > qtpad->first_dts)
|
||||
ctts = qtpad->first_ts - qtpad->first_dts;
|
||||
|
||||
media_start = gst_util_uint64_scale_round (ctts,
|
||||
atom_trak_get_timescale (qtpad->trak), GST_SECOND);
|
||||
|
||||
|
|
Loading…
Reference in a new issue