From da70785dcdc57e4f006b7bb67649f3dafef06b6e Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 22 Jan 2010 16:55:14 +0200 Subject: [PATCH] assert: g_assert_not_reached() cannot replace return statement Fix build with assert being turned off. --- gst/asfdemux/gstasfdemux.c | 4 ++-- gst/mpegstream/gstmpegpacketize.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c index 135d910d5c..72a7e523e8 100644 --- a/gst/asfdemux/gstasfdemux.c +++ b/gst/asfdemux/gstasfdemux.c @@ -1880,10 +1880,10 @@ gst_asf_demux_get_var_length (guint8 type, guint8 ** p_data, guint64 * p_size) return gst_asf_demux_get_uint32 (p_data, p_size); default: + g_assert_not_reached (); break; } - - g_assert_not_reached (); + return 0; } static gboolean diff --git a/gst/mpegstream/gstmpegpacketize.c b/gst/mpegstream/gstmpegpacketize.c index e71317b3bd..609e23ecec 100644 --- a/gst/mpegstream/gstmpegpacketize.c +++ b/gst/mpegstream/gstmpegpacketize.c @@ -356,4 +356,5 @@ gst_mpeg_packetize_read (GstMPEGPacketize * packetize, GstBuffer ** outbuf) } g_assert_not_reached (); + return GST_FLOW_ERROR; }