gst/playback/gstplaybasebin.c: Throw error if we failed to find a suitable output...
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Fri, 24 Sep 2004 16:01:46 +0000 (16:01 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Fri, 24 Sep 2004 16:01:46 +0000 (16:01 +0000)
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
gst/playback/gstplaybasebin.c

index f0acaf8..8623b25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-09-24  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
+
+       * 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  <rbultje@ronald.bitfreak.net>
 
        * ext/dirac/Makefile.am:
index cd300bc..5520d1c 100644 (file)
@@ -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);
       }