mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 12:02:27 +00:00
matroskamux: fix segment handling, so we actually use running time
gst_matroska_mux_best_pad adjusts the buffer timestamp to running time using the segment stored in the pad's collect data. However, the event handler didn't pass the newsegment event on to collectpads' handler, so this segment was never updated at all. Re-fixes bug #432612.
This commit is contained in:
parent
bf65acf11f
commit
26d0812543
1 changed files with 15 additions and 5 deletions
|
@ -658,12 +658,18 @@ gst_matroska_mux_handle_sink_event (GstPad * pad, GstEvent * event)
|
|||
event = NULL;
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_NEWSEGMENT:
|
||||
/* We don't support NEWSEGMENT events */
|
||||
case GST_EVENT_NEWSEGMENT:{
|
||||
GstFormat format;
|
||||
|
||||
gst_event_parse_new_segment (event, NULL, NULL, &format, NULL, NULL,
|
||||
NULL);
|
||||
if (format != GST_FORMAT_TIME) {
|
||||
ret = FALSE;
|
||||
gst_event_unref (event);
|
||||
event = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_CUSTOM_DOWNSTREAM:{
|
||||
const GstStructure *structure;
|
||||
|
||||
|
@ -2491,6 +2497,10 @@ gst_matroska_mux_best_pad (GstMatroskaMux * mux, gboolean * popped)
|
|||
collect_pad->buffer = NULL;
|
||||
return NULL;
|
||||
} else {
|
||||
GST_LOG_OBJECT (mux, "buffer ts %" GST_TIME_FORMAT " -> %"
|
||||
GST_TIME_FORMAT " running time",
|
||||
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (collect_pad->buffer)),
|
||||
GST_TIME_ARGS (time));
|
||||
collect_pad->buffer =
|
||||
gst_buffer_make_metadata_writable (collect_pad->buffer);
|
||||
GST_BUFFER_TIMESTAMP (collect_pad->buffer) = time;
|
||||
|
|
Loading…
Reference in a new issue