From 05090d3025b378e41b8fca1be34b3b1f09ca22d1 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 24 Sep 2004 16:01:46 +0000 Subject: [PATCH] gst/playback/gstplaybasebin.c: Throw error if we failed to find a suitable output. This should throw an error if we s... Original commit message from CVS: * gst/playback/gstplaybasebin.c: (gst_play_base_bin_change_state): Throw error if we failed to find a suitable output. This should throw an error if we successfully set up a pipeline (e.g. because we recognized a media file) but found no decodable streams in it (e.g. because it contains only media stream types for which we have no decoders, or because it's not a media type). --- ChangeLog | 9 +++++++++ gst/playback/gstplaybasebin.c | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index f0acaf8..8623b25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-09-24 Ronald S. Bultje + + * gst/playback/gstplaybasebin.c: (gst_play_base_bin_change_state): + Throw error if we failed to find a suitable output. This should + throw an error if we successfully set up a pipeline (e.g. because + we recognized a media file) but found no decodable streams in it + (e.g. because it contains only media stream types for which we + have no decoders, or because it's not a media type). + 2004-09-23 Ronald S. Bultje * ext/dirac/Makefile.am: diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index cd300bc..5520d1c 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -555,6 +555,12 @@ gst_play_base_bin_change_state (GstElement * element) CODEC_NOT_FOUND, ("cannot open file \"%s\"", play_base_bin->uri), (NULL)); ret = GST_STATE_FAILURE; + } else if (!play_base_bin->streaminfo) { + GST_ELEMENT_ERROR (GST_ELEMENT (play_base_bin), STREAM, + CODEC_NOT_FOUND, + ("Failed to find any supported stream in file \"%s\"", + play_base_bin->uri), (NULL)); + ret = GST_STATE_FAILURE; } else { ret = gst_element_set_state (play_base_bin->thread, GST_STATE_PAUSED); } -- 2.7.4