From ee759fb4bf060561b65e189b2584d64720d41cb7 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 20 Mar 2023 11:20:30 +0100 Subject: [PATCH] plugins: Fix wrong enum usage gcc 13 now detects conflicting enum usages. Fix the various cases where it was wrong Part-of: --- subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegdec.c | 8 ++++---- subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegdec.h | 2 +- .../gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 2 +- subprojects/gst-plugins-base/ext/theora/gsttheoraenc.c | 4 ++-- subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c | 2 +- subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegdec.c b/subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegdec.c index 83348f5bcb..e121100c88 100644 --- a/subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegdec.c +++ b/subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegdec.c @@ -70,7 +70,7 @@ static gboolean gst_openjpeg_dec_stop (GstVideoDecoder * decoder); static gboolean gst_openjpeg_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state); static gboolean gst_openjpeg_dec_flush (GstVideoDecoder * decoder); -static gboolean gst_openjpeg_dec_finish (GstVideoDecoder * decoder); +static GstFlowReturn gst_openjpeg_dec_finish (GstVideoDecoder * decoder); static GstFlowReturn gst_openjpeg_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame); static gboolean gst_openjpeg_dec_decide_allocation (GstVideoDecoder * decoder, @@ -80,10 +80,10 @@ static void gst_openjpeg_dec_set_property (GObject * object, static void gst_openjpeg_dec_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static gboolean gst_openjpeg_dec_decode_frame_multiple (GstVideoDecoder * +static GstFlowReturn gst_openjpeg_dec_decode_frame_multiple (GstVideoDecoder * + decoder, GstVideoCodecFrame * frame); +static GstFlowReturn gst_openjpeg_dec_decode_frame_single (GstVideoDecoder * decoder, GstVideoCodecFrame * frame); -static gboolean gst_openjpeg_dec_decode_frame_single (GstVideoDecoder * decoder, - GstVideoCodecFrame * frame); static void gst_openjpeg_dec_pause_loop (GstOpenJPEGDec * self, GstFlowReturn flow_ret); diff --git a/subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegdec.h b/subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegdec.h index 413062e3f9..3266360e8f 100644 --- a/subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegdec.h +++ b/subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegdec.h @@ -66,7 +66,7 @@ struct _GstOpenJPEGDec void (*fill_frame) (GstOpenJPEGDec *self, GstVideoFrame *frame, opj_image_t * image); - gboolean (*decode_frame) (GstVideoDecoder * decoder, GstVideoCodecFrame *frame); + GstFlowReturn (*decode_frame) (GstVideoDecoder * decoder, GstVideoCodecFrame *frame); opj_dparameters_t params; diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/subprojects/gst-plugins-bad/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index 6b31a08f68..b783a21967 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -271,7 +271,7 @@ static gboolean gst_adaptive_demux_has_next_period (GstAdaptiveDemux * demux); static void gst_adaptive_demux_advance_period (GstAdaptiveDemux * demux); static void gst_adaptive_demux_stream_free (GstAdaptiveDemuxStream * stream); -static GstFlowReturn +static gboolean gst_adaptive_demux_stream_push_event (GstAdaptiveDemuxStream * stream, GstEvent * event); diff --git a/subprojects/gst-plugins-base/ext/theora/gsttheoraenc.c b/subprojects/gst-plugins-base/ext/theora/gsttheoraenc.c index d7f07a09f0..6ec2a71dc3 100644 --- a/subprojects/gst-plugins-base/ext/theora/gsttheoraenc.c +++ b/subprojects/gst-plugins-base/ext/theora/gsttheoraenc.c @@ -1051,7 +1051,7 @@ encoder_disabled: } } -static gboolean +static GstFlowReturn theora_enc_finish (GstVideoEncoder * benc) { GstTheoraEnc *enc; @@ -1071,7 +1071,7 @@ theora_enc_finish (GstVideoEncoder * benc) theora_enc_clear_multipass_cache (enc); - return TRUE; + return GST_FLOW_OK; } static gboolean diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c index c37bdf280f..3d51076bc8 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c @@ -1265,7 +1265,7 @@ gst_rtp_h264_pay_send_bundle (GstRtpH264Pay * rtph264pay, gboolean end_of_au) end_of_au, delta, discont); } -static gboolean +static GstFlowReturn gst_rtp_h264_pay_payload_nal_bundle (GstRTPBasePayload * basepayload, GstBuffer * paybuf, GstClockTime dts, GstClockTime pts, gboolean end_of_au, gboolean delta_unit, gboolean discont, guint8 nal_header) diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c index 82b68cce9f..e06c928e4a 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c @@ -1351,7 +1351,7 @@ gst_rtp_h265_pay_send_bundle (GstRtpH265Pay * rtph265pay, gboolean marker) marker, delta_unit); } -static gboolean +static GstFlowReturn gst_rtp_h265_pay_payload_nal_bundle (GstRTPBasePayload * basepayload, GstBuffer * paybuf, GstClockTime dts, GstClockTime pts, gboolean marker, gboolean delta_unit, guint8 nal_type,