ext/mad/gstmad.c: Proper warning statements,

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
This commit is contained in:
Edward Hervey 2005-11-28 15:47:01 +00:00
parent 03f5cf36ae
commit 254cf104d8
4 changed files with 21 additions and 5 deletions

View file

@ -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):

2
common

@ -1 +1 @@
Subproject commit c04ad83a0c184fcd311de39371570b9e773a60d0
Subproject commit b0b08bcd66ca385364b6f90663585b09693aec67

View 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;
}

View 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