mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
playback/player: gst-play: Check if the stream list is empty in print_all_stream_info
Add a check condition if the stream list is empty before using it.
This commit is contained in:
parent
b5c10865aa
commit
c454b2914e
1 changed files with 6 additions and 4 deletions
|
@ -197,10 +197,6 @@ print_all_stream_info (GstPlayerMediaInfo * media_info)
|
|||
guint count = 0;
|
||||
GList *list, *l;
|
||||
|
||||
list = gst_player_media_info_get_stream_list (media_info);
|
||||
if (!list)
|
||||
return;
|
||||
|
||||
g_print ("URI : %s\n", gst_player_media_info_get_uri (media_info));
|
||||
g_print ("Duration: %" GST_TIME_FORMAT "\n",
|
||||
GST_TIME_ARGS (gst_player_media_info_get_duration (media_info)));
|
||||
|
@ -210,6 +206,12 @@ print_all_stream_info (GstPlayerMediaInfo * media_info)
|
|||
print_one_tag, NULL);
|
||||
else
|
||||
g_print (" (nil) \n");
|
||||
|
||||
list = gst_player_media_info_get_stream_list (media_info);
|
||||
if (!list)
|
||||
return;
|
||||
|
||||
g_print ("All Stream information\n");
|
||||
for (l = list; l != NULL; l = l->next) {
|
||||
GstTagList *tags = NULL;
|
||||
GstPlayerStreamInfo *stream = (GstPlayerStreamInfo *) l->data;
|
||||
|
|
Loading…
Reference in a new issue