mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
qtdemux: Protect against NULL pointer dereference for streams without caps
CID 1363332
This commit is contained in:
parent
f2e17f5791
commit
ce2070c092
1 changed files with 9 additions and 4 deletions
|
@ -7814,12 +7814,17 @@ gst_qtdemux_configure_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
|
|||
|
||||
prev_caps = gst_pad_get_current_caps (stream->pad);
|
||||
|
||||
if (stream->caps) {
|
||||
if (!prev_caps || !gst_caps_is_equal_fixed (prev_caps, stream->caps)) {
|
||||
GST_DEBUG_OBJECT (qtdemux, "setting caps %" GST_PTR_FORMAT, 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");
|
||||
}
|
||||
} else {
|
||||
GST_WARNING_OBJECT (qtdemux, "stream without caps");
|
||||
}
|
||||
|
||||
if (prev_caps)
|
||||
gst_caps_unref (prev_caps);
|
||||
|
|
Loading…
Reference in a new issue