mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
mpegpsdemux: Workaround new gcc 4.5 compiler warning
gcc 4.5 warns when comparing some integer with an enum value, in the case of GstFlowReturn this is valid though. We should later add GST_FLOW_CUSTOM_OK1, GST_FLOW_CUSTOM_OK2, etc. after new core is released.
This commit is contained in:
parent
1f102af33d
commit
a331228ecc
1 changed files with 30 additions and 24 deletions
|
@ -2839,17 +2839,20 @@ gst_flups_demux_chain (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
switch (ret) {
|
||||
case GST_FLOW_NEED_MORE_DATA:
|
||||
/* Go and get more data */
|
||||
ret = GST_FLOW_OK;
|
||||
goto done;
|
||||
case GST_FLOW_LOST_SYNC:
|
||||
/* for FLOW_OK or lost-sync, carry onto resync */
|
||||
ret = GST_FLOW_OK;
|
||||
break;
|
||||
case GST_FLOW_OK:
|
||||
break;
|
||||
default:
|
||||
/* FIXME: gcc 4.5 warns if comparing some integer with
|
||||
* an enum value! */
|
||||
if ((gint) ret == GST_FLOW_NEED_MORE_DATA) {
|
||||
/* Go and get more data */
|
||||
ret = GST_FLOW_OK;
|
||||
goto done;
|
||||
} else if ((gint) ret == GST_FLOW_LOST_SYNC) {
|
||||
/* for FLOW_OK or lost-sync, carry onto resync */
|
||||
ret = GST_FLOW_OK;
|
||||
break;
|
||||
}
|
||||
/* Any other return value should be sent upstream immediately */
|
||||
goto done;
|
||||
}
|
||||
|
@ -2895,11 +2898,14 @@ gst_flups_demux_chain (GstPad * pad, GstBuffer * buffer)
|
|||
save = FALSE;
|
||||
|
||||
switch (ret) {
|
||||
case GST_FLOW_NEED_MORE_DATA:
|
||||
default:
|
||||
/* FIXME: gcc 4.5 warns if comparing some integer with
|
||||
* an enum value! */
|
||||
if ((gint) ret == GST_FLOW_NEED_MORE_DATA) {
|
||||
GST_DEBUG_OBJECT (demux, "need more data");
|
||||
ret = GST_FLOW_OK;
|
||||
goto done;
|
||||
case GST_FLOW_LOST_SYNC:
|
||||
} else if ((gint) ret == GST_FLOW_LOST_SYNC) {
|
||||
if (!save || demux->sink_segment.rate >= 0.0) {
|
||||
GST_DEBUG_OBJECT (demux, "flushing 3 bytes");
|
||||
gst_adapter_flush (demux->adapter, 3);
|
||||
|
@ -2911,7 +2917,7 @@ gst_flups_demux_chain (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
ret = GST_FLOW_OK;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue