diff options
author | Vineeth T M <vineeth.tm@samsung.com> | 2015-08-24 12:30:57 +0900 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2015-11-17 10:10:10 +0100 |
commit | 680ca5e10f89fc48134d3c1fbf3005ceeae723d7 (patch) | |
tree | 8d70af445670b59711cab5729eafea4f25c1646a | |
parent | ade0fb3fed840cf8d2d720ca264f0dc75d802bfd (diff) |
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
-rw-r--r-- | validate/gst/validate/media-descriptor-writer.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/validate/gst/validate/media-descriptor-writer.c b/validate/gst/validate/media-descriptor-writer.c index d30947b..ea43bd0 100644 --- a/validate/gst/validate/media-descriptor-writer.c +++ b/validate/gst/validate/media-descriptor-writer.c @@ -563,22 +563,22 @@ gst_media_descriptor_writer_new_discover (GstValidateRunner * runner, } } - writer = - gst_media_descriptor_writer_new (runner, - gst_discoverer_info_get_uri (info), - gst_discoverer_info_get_duration (info), - gst_discoverer_info_get_seekable (info)); + streaminfo = gst_discoverer_info_get_stream_info (info); - if (handle_g_logs) - gst_validate_reporter_set_handle_g_logs (GST_VALIDATE_REPORTER (writer)); + if (streaminfo) { + writer = + gst_media_descriptor_writer_new (runner, + gst_discoverer_info_get_uri (info), + gst_discoverer_info_get_duration (info), + gst_discoverer_info_get_seekable (info)); - tags = gst_discoverer_info_get_tags (info); - if (tags) - gst_media_descriptor_writer_add_taglist (writer, tags); + if (handle_g_logs) + gst_validate_reporter_set_handle_g_logs (GST_VALIDATE_REPORTER (writer)); - streaminfo = gst_discoverer_info_get_stream_info (info); + tags = gst_discoverer_info_get_tags (info); + if (tags) + gst_media_descriptor_writer_add_taglist (writer, tags); - if (streaminfo) { if (GST_IS_DISCOVERER_CONTAINER_INFO (streaminfo)) { ((GstMediaDescriptor *) writer)->filenode->caps = gst_discoverer_stream_info_get_caps (GST_DISCOVERER_STREAM_INFO @@ -594,6 +594,7 @@ gst_media_descriptor_writer_new_discover (GstValidateRunner * runner, } else { GST_VALIDATE_REPORT (writer, FILE_NO_STREAM_INFO, "Discoverer info, does not contain the stream info"); + goto out; } media_descriptor = (GstMediaDescriptor *) writer; |