ext/mad/gstmad.c: Proper warning statements,
authorEdward Hervey <bilboed@bilboed.com>
Mon, 28 Nov 2005 15:47:01 +0000 (15:47 +0000)
committerEdward Hervey <bilboed@bilboed.com>
Mon, 28 Nov 2005 15:47:01 +0000 (15:47 +0000)
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_chain):
Proper warning statements,
Don't error if the src pad isn't linked when pushing.
* gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_change_state):
Proper state_change, avoids borkage when going to READY

ChangeLog
common
ext/mad/gstmad.c
gst/mpegstream/gstmpegparse.c

index eb1e4bb..253f6b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-11-28  Edward Hervey  <edward@fluendo.com>
+
+       * ext/mad/gstmad.c: (gst_mad_chain):
+       Proper warning statements,
+       Don't error if the src pad isn't linked when pushing.
+       * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_change_state):
+       Proper state_change, avoids borkage when going to READY
+
 2005-11-25  Jan Schmidt  <thaytan@mad.scientist.com>
 
        * ext/mpeg2dec/gstmpeg2dec.c: (handle_sequence):
diff --git a/common b/common
index c04ad83..b0b08bc 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit c04ad83a0c184fcd311de39371570b9e773a60d0
+Subproject commit b0b08bcd66ca385364b6f90663585b09693aec67
index cd26f74..77e9271 100644 (file)
@@ -1343,7 +1343,7 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
        * some weird decoding errors... */
       GST_LOG ("decoding the header now");
       if (mad_header_decode (&mad->frame.header, &mad->stream) == -1) {
-        GST_DEBUG ("mad_frame_decode had an error: %s",
+        GST_WARNING ("mad_frame_decode had an error: %s",
             mad_stream_errorstr (&mad->stream));
       }
 
@@ -1365,7 +1365,7 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
         }
         /* we are in an error state */
         mad->in_error = TRUE;
-        GST_DEBUG ("mad_frame_decode had an error: %s",
+        GST_WARNING ("mad_frame_decode had an error: %s",
             mad_stream_errorstr (&mad->stream));
         if (!MAD_RECOVERABLE (mad->stream.error)) {
           GST_ELEMENT_ERROR (mad, STREAM, DECODE, (NULL), (NULL));
@@ -1549,7 +1549,7 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
         }
 
         result = gst_pad_push (mad->srcpad, outbuffer);
-        if (result != GST_FLOW_OK && result != GST_FLOW_NOT_LINKED) {
+        if (result != GST_FLOW_OK) {
           /* Head for the exit, dropping samples as we go */
           goto_exit = TRUE;
         }
index 87f6972..5418564 100644 (file)
@@ -1114,6 +1114,7 @@ static GstStateChangeReturn
 gst_mpeg_parse_change_state (GstElement * element, GstStateChange transition)
 {
   GstMPEGParse *mpeg_parse = GST_MPEG_PARSE (element);
+  GstStateChangeReturn result = GST_STATE_CHANGE_FAILURE;
 
   switch (transition) {
     case GST_STATE_CHANGE_READY_TO_PAUSED:
@@ -1125,6 +1126,13 @@ gst_mpeg_parse_change_state (GstElement * element, GstStateChange transition)
       /* initialize parser state */
       gst_mpeg_parse_reset (mpeg_parse);
       break;
+    default:
+      break;
+  }
+
+  result = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  switch (transition) {
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       if (mpeg_parse->packetize) {
         gst_mpeg_packetize_destroy (mpeg_parse->packetize);
@@ -1136,7 +1144,7 @@ gst_mpeg_parse_change_state (GstElement * element, GstStateChange transition)
       break;
   }
 
-  return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+  return result;
 }
 
 static void