[gst-cvs] gst-plugins-bad: resindvdbin: Apply gcc 4. 5 compiler warning workaround to the mpegpsdemux copy
Sebastian Dröge
slomo at kemper.freedesktop.org
Thu Apr 15 12:40:47 PDT 2010
Module: gst-plugins-bad
Branch: master
Commit: 65b0f75d1b3119316b2dcaf5bff4dfd2bd824cc1
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=65b0f75d1b3119316b2dcaf5bff4dfd2bd824cc1
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Thu Apr 15 21:40:19 2010 +0200
resindvdbin: Apply gcc 4.5 compiler warning workaround to the mpegpsdemux copy
Same as a331228eccfb8c66493fa3c8c49338c79cf4642c.
---
ext/resindvd/gstmpegdemux.c | 54 +++++++++++++++++++++++-------------------
1 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/ext/resindvd/gstmpegdemux.c b/ext/resindvd/gstmpegdemux.c
index bfa8835..f09d145 100644
--- a/ext/resindvd/gstmpegdemux.c
+++ b/ext/resindvd/gstmpegdemux.c
@@ -1933,17 +1933,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;
}
@@ -1985,23 +1988,26 @@ gst_flups_demux_chain (GstPad * pad, GstBuffer * buffer)
save = FALSE;
switch (ret) {
- case GST_FLOW_NEED_MORE_DATA:
- GST_DEBUG_OBJECT (demux, "need more data");
- ret = GST_FLOW_OK;
- goto done;
- case 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);
- ADAPTER_OFFSET_FLUSH (3);
- } else {
- GST_DEBUG_OBJECT (demux, "saving 3 bytes");
- gst_adapter_push (demux->rev_adapter,
- gst_adapter_take_buffer (demux->adapter, 3));
- }
- ret = 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) {
+ GST_DEBUG_OBJECT (demux, "need more data");
+ ret = GST_FLOW_OK;
+ goto done;
+ } 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);
+ ADAPTER_OFFSET_FLUSH (3);
+ } else {
+ GST_DEBUG_OBJECT (demux, "saving 3 bytes");
+ gst_adapter_push (demux->rev_adapter,
+ gst_adapter_take_buffer (demux->adapter, 3));
+ }
+ ret = GST_FLOW_OK;
+ break;
+ }
break;
}
}
More information about the Gstreamer-commits
mailing list