Commit 084dacbb authored by Michael Smith's avatar Michael Smith
Browse files

ext/ogg/gstoggmux.c: Don't generate out-of-order timestamps from oggmux,...

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
parent 6b4cf938
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>
 
* gst/tcp/gstmultifdsink.c: (gst_sync_method_get_type),
......@@ -111,6 +111,9 @@ struct _GstOggMux
/* next timestamp for the page */
GstClockTime next_ts;
/* Last timestamp actually output on src pad */
GstClockTime last_ts;
/* offset in stream */
guint64 offset;
......@@ -293,6 +296,7 @@ gst_ogg_mux_clear (GstOggMux * ogg_mux)
ogg_mux->delta_pad = NULL;
ogg_mux->offset = 0;
ogg_mux->next_ts = 0;
ogg_mux->last_ts = GST_CLOCK_TIME_NONE;
}
static void
......@@ -517,6 +521,14 @@ gst_ogg_mux_push_buffer (GstOggMux * mux, GstBuffer * buffer)
mux->offset += GST_BUFFER_SIZE (buffer);
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);
gst_buffer_set_caps (buffer, caps);
gst_caps_unref (caps);
......
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