Just error out if there is no valid PTS.
https://bugzilla.gnome.org/show_bug.cgi?id=772143
- if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS (last_buf))) {
+ if (!GST_BUFFER_PTS_IS_VALID (last_buf))
+ goto no_pts;
+
+ if (GST_BUFFER_DTS_IS_VALID (last_buf)) {
last_dts = gst_util_uint64_scale_round (GST_BUFFER_DTS (last_buf),
atom_trak_get_timescale (pad->trak), GST_SECOND);
pts_offset =
(gint64) (gst_util_uint64_scale_round (GST_BUFFER_PTS (last_buf),
atom_trak_get_timescale (pad->trak), GST_SECOND) - last_dts);
last_dts = gst_util_uint64_scale_round (GST_BUFFER_DTS (last_buf),
atom_trak_get_timescale (pad->trak), GST_SECOND);
pts_offset =
(gint64) (gst_util_uint64_scale_round (GST_BUFFER_PTS (last_buf),
atom_trak_get_timescale (pad->trak), GST_SECOND) - last_dts);
} else {
pts_offset = 0;
last_dts = gst_util_uint64_scale_round (GST_BUFFER_PTS (last_buf),
} else {
pts_offset = 0;
last_dts = gst_util_uint64_scale_round (GST_BUFFER_PTS (last_buf),
("Audio buffer contains fragmented sample."));
goto bail;
}
("Audio buffer contains fragmented sample."));
goto bail;
}
+no_pts:
+ {
+ GST_ELEMENT_ERROR (qtmux, STREAM, MUX, (NULL), ("Buffer has no PTS."));
+ goto bail;
+ }
not_negotiated:
{
GST_ELEMENT_ERROR (qtmux, CORE, NEGOTIATION, (NULL),
not_negotiated:
{
GST_ELEMENT_ERROR (qtmux, CORE, NEGOTIATION, (NULL),