mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-22 02:13:46 +00:00
ext/ogg/gstoggmux.c: Don't generate out-of-order timestamps from oggmux, instead clamp output timestamps to be >= the...
Original commit message from CVS: * ext/ogg/gstoggmux.c: (gst_ogg_mux_clear), (gst_ogg_mux_push_buffer): Don't generate out-of-order timestamps from oggmux, instead clamp output timestamps to be >= the previously output ts. Fixes #355595
This commit is contained in:
parent
6b4cf938a4
commit
084dacbba2
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2006-09-18 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
|
* ext/ogg/gstoggmux.c: (gst_ogg_mux_clear),
|
||||||
|
(gst_ogg_mux_push_buffer):
|
||||||
|
Don't generate out-of-order timestamps from oggmux, instead clamp
|
||||||
|
output timestamps to be >= the previously output ts.
|
||||||
|
Fixes #355595
|
||||||
|
|
||||||
2006-09-18 Michael Smith <msmith@fluendo.com>
|
2006-09-18 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
* gst/tcp/gstmultifdsink.c: (gst_sync_method_get_type),
|
* gst/tcp/gstmultifdsink.c: (gst_sync_method_get_type),
|
||||||
|
|
|
@ -111,6 +111,9 @@ struct _GstOggMux
|
||||||
/* next timestamp for the page */
|
/* next timestamp for the page */
|
||||||
GstClockTime next_ts;
|
GstClockTime next_ts;
|
||||||
|
|
||||||
|
/* Last timestamp actually output on src pad */
|
||||||
|
GstClockTime last_ts;
|
||||||
|
|
||||||
/* offset in stream */
|
/* offset in stream */
|
||||||
guint64 offset;
|
guint64 offset;
|
||||||
|
|
||||||
|
@ -293,6 +296,7 @@ gst_ogg_mux_clear (GstOggMux * ogg_mux)
|
||||||
ogg_mux->delta_pad = NULL;
|
ogg_mux->delta_pad = NULL;
|
||||||
ogg_mux->offset = 0;
|
ogg_mux->offset = 0;
|
||||||
ogg_mux->next_ts = 0;
|
ogg_mux->next_ts = 0;
|
||||||
|
ogg_mux->last_ts = GST_CLOCK_TIME_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -517,6 +521,14 @@ gst_ogg_mux_push_buffer (GstOggMux * mux, GstBuffer * buffer)
|
||||||
mux->offset += GST_BUFFER_SIZE (buffer);
|
mux->offset += GST_BUFFER_SIZE (buffer);
|
||||||
GST_BUFFER_OFFSET_END (buffer) = mux->offset;
|
GST_BUFFER_OFFSET_END (buffer) = mux->offset;
|
||||||
|
|
||||||
|
/* Ensure we have monotonically increasing timestamps in the output. */
|
||||||
|
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) {
|
||||||
|
if (GST_BUFFER_TIMESTAMP (buffer) < mux->last_ts)
|
||||||
|
GST_BUFFER_TIMESTAMP (buffer) = mux->last_ts;
|
||||||
|
else
|
||||||
|
mux->last_ts = GST_BUFFER_TIMESTAMP (buffer);
|
||||||
|
}
|
||||||
|
|
||||||
caps = gst_pad_get_negotiated_caps (mux->srcpad);
|
caps = gst_pad_get_negotiated_caps (mux->srcpad);
|
||||||
gst_buffer_set_caps (buffer, caps);
|
gst_buffer_set_caps (buffer, caps);
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
Loading…
Reference in a new issue