mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 06:16:36 +00:00
tools: discoverer: When info is NULL just print error and return
In case discover_uri returns NULL info, passing the info to discoverer APIs result in critical assertion errors. Hence instead of passing NULL info along, print the error and return. https://bugzilla.gnome.org/show_bug.cgi?id=753701
This commit is contained in:
parent
2727ca01f5
commit
b632b206e1
1 changed files with 8 additions and 1 deletions
|
@ -381,9 +381,16 @@ print_properties (GstDiscovererInfo * info, gint tab)
|
|||
static void
|
||||
print_info (GstDiscovererInfo * info, GError * err)
|
||||
{
|
||||
GstDiscovererResult result = gst_discoverer_info_get_result (info);
|
||||
GstDiscovererResult result;
|
||||
GstDiscovererStreamInfo *sinfo;
|
||||
|
||||
if (!info) {
|
||||
g_print ("Could not discover URI\n");
|
||||
g_print (" %s\n", err->message);
|
||||
return;
|
||||
}
|
||||
|
||||
result = gst_discoverer_info_get_result (info);
|
||||
g_print ("Done discovering %s\n", gst_discoverer_info_get_uri (info));
|
||||
switch (result) {
|
||||
case GST_DISCOVERER_OK:
|
||||
|
|
Loading…
Reference in a new issue