mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
qtdemux: Push caps only when it was updated
Commit 7873bede31
caused new caps
event per moof without consideration of duplication.
https://bugzilla.gnome.org/show_bug.cgi?id=768268
This commit is contained in:
parent
850a8bc077
commit
231018bcfe
1 changed files with 14 additions and 2 deletions
|
@ -7469,6 +7469,8 @@ gst_qtdemux_configure_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream->pad) {
|
if (stream->pad) {
|
||||||
|
GstCaps *prev_caps = NULL;
|
||||||
|
|
||||||
GST_PAD_ELEMENT_PRIVATE (stream->pad) = stream;
|
GST_PAD_ELEMENT_PRIVATE (stream->pad) = stream;
|
||||||
gst_pad_set_event_function (stream->pad, gst_qtdemux_handle_src_event);
|
gst_pad_set_event_function (stream->pad, gst_qtdemux_handle_src_event);
|
||||||
gst_pad_set_query_function (stream->pad, gst_qtdemux_handle_src_query);
|
gst_pad_set_query_function (stream->pad, gst_qtdemux_handle_src_query);
|
||||||
|
@ -7484,7 +7486,6 @@ gst_qtdemux_configure_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (qtdemux, "setting caps %" GST_PTR_FORMAT, stream->caps);
|
|
||||||
if (stream->new_stream) {
|
if (stream->new_stream) {
|
||||||
gchar *stream_id;
|
gchar *stream_id;
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
|
@ -7520,7 +7521,18 @@ gst_qtdemux_configure_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
|
||||||
gst_pad_push_event (stream->pad, event);
|
gst_pad_push_event (stream->pad, event);
|
||||||
g_free (stream_id);
|
g_free (stream_id);
|
||||||
}
|
}
|
||||||
gst_pad_set_caps (stream->pad, stream->caps);
|
|
||||||
|
prev_caps = gst_pad_get_current_caps (stream->pad);
|
||||||
|
|
||||||
|
if (!prev_caps || !gst_caps_is_equal_fixed (prev_caps, stream->caps)) {
|
||||||
|
GST_DEBUG_OBJECT (qtdemux, "setting caps %" GST_PTR_FORMAT, stream->caps);
|
||||||
|
gst_pad_set_caps (stream->pad, stream->caps);
|
||||||
|
} else {
|
||||||
|
GST_DEBUG_OBJECT (qtdemux, "ignore duplicated caps");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prev_caps)
|
||||||
|
gst_caps_unref (prev_caps);
|
||||||
stream->new_caps = FALSE;
|
stream->new_caps = FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue