mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
validate: media-descriptor-writer: Don't create media info when stream info is not present.
When a file does not contain any stream info, then there is no need to create the media info file as, it is not considered to be a valid file and no validate checks are done for the same. This skips unnecessary files like .txt, .dump files https://bugzilla.gnome.org/show_bug.cgi?id=754006
This commit is contained in:
parent
ade0fb3fed
commit
680ca5e10f
1 changed files with 14 additions and 13 deletions
|
@ -563,6 +563,9 @@ gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
streaminfo = gst_discoverer_info_get_stream_info (info);
|
||||||
|
|
||||||
|
if (streaminfo) {
|
||||||
writer =
|
writer =
|
||||||
gst_media_descriptor_writer_new (runner,
|
gst_media_descriptor_writer_new (runner,
|
||||||
gst_discoverer_info_get_uri (info),
|
gst_discoverer_info_get_uri (info),
|
||||||
|
@ -576,9 +579,6 @@ gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
||||||
if (tags)
|
if (tags)
|
||||||
gst_media_descriptor_writer_add_taglist (writer, tags);
|
gst_media_descriptor_writer_add_taglist (writer, tags);
|
||||||
|
|
||||||
streaminfo = gst_discoverer_info_get_stream_info (info);
|
|
||||||
|
|
||||||
if (streaminfo) {
|
|
||||||
if (GST_IS_DISCOVERER_CONTAINER_INFO (streaminfo)) {
|
if (GST_IS_DISCOVERER_CONTAINER_INFO (streaminfo)) {
|
||||||
((GstMediaDescriptor *) writer)->filenode->caps =
|
((GstMediaDescriptor *) writer)->filenode->caps =
|
||||||
gst_discoverer_stream_info_get_caps (GST_DISCOVERER_STREAM_INFO
|
gst_discoverer_stream_info_get_caps (GST_DISCOVERER_STREAM_INFO
|
||||||
|
@ -594,6 +594,7 @@ gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
||||||
} else {
|
} else {
|
||||||
GST_VALIDATE_REPORT (writer, FILE_NO_STREAM_INFO,
|
GST_VALIDATE_REPORT (writer, FILE_NO_STREAM_INFO,
|
||||||
"Discoverer info, does not contain the stream info");
|
"Discoverer info, does not contain the stream info");
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
media_descriptor = (GstMediaDescriptor *) writer;
|
media_descriptor = (GstMediaDescriptor *) writer;
|
||||||
|
|
Loading…
Reference in a new issue