mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
validate: don't pass NULL to gst_caps_copy()
This commit is contained in:
parent
36e69f305a
commit
abb9e0ff2a
1 changed files with 4 additions and 3 deletions
|
@ -511,6 +511,7 @@ gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
||||||
GstDiscoverer *discoverer;
|
GstDiscoverer *discoverer;
|
||||||
GstDiscovererStreamInfo *streaminfo = NULL;
|
GstDiscovererStreamInfo *streaminfo = NULL;
|
||||||
GstMediaDescriptorWriter *writer = NULL;
|
GstMediaDescriptorWriter *writer = NULL;
|
||||||
|
GstMediaDescriptor *media_descriptor;
|
||||||
|
|
||||||
discoverer = gst_discoverer_new (GST_SECOND * 60, err);
|
discoverer = gst_discoverer_new (GST_SECOND * 60, err);
|
||||||
|
|
||||||
|
@ -558,9 +559,9 @@ gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
||||||
gst_media_descriptor_writer_add_stream (writer, streaminfo);
|
gst_media_descriptor_writer_add_stream (writer, streaminfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (streams == NULL)
|
media_descriptor = (GstMediaDescriptor *) writer;
|
||||||
writer->priv->raw_caps =
|
if (streams == NULL && media_descriptor->filenode->caps)
|
||||||
gst_caps_copy (((GstMediaDescriptor *) writer)->filenode->caps);
|
writer->priv->raw_caps = gst_caps_copy (media_descriptor->filenode->caps);
|
||||||
gst_discoverer_stream_info_list_free (streams);
|
gst_discoverer_stream_info_list_free (streams);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue