From c9f0807752f6ae09ee85478c8d16d53d222f6435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Fri, 3 Apr 2015 20:02:29 +0200 Subject: [PATCH] decoder: cast GST_VAAPI_DECODER_STATUS_DROP_FRAME Since GST_VAAPI_DECODER_STATUS_DROP_FRAME is not part of the enum GstVaapiDecoderStatus, we need to cast it to avoid compiler complains. https://bugzilla.gnome.org/show_bug.cgi?id=747312 --- gst-libs/gst/vaapi/gstvaapidecoder.c | 2 +- gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 6 +----- gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c | 2 +- gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c | 2 +- gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c index 87801f186a..d1bf5a19e0 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder.c @@ -241,7 +241,7 @@ do_decode_1 (GstVaapiDecoder * decoder, GstVaapiParserFrame * frame) /* Drop frame if there is no slice data unit in there */ if (G_UNLIKELY (frame->units->len == 0)) - return GST_VAAPI_DECODER_STATUS_DROP_FRAME; + return (GstVaapiDecoderStatus) GST_VAAPI_DECODER_STATUS_DROP_FRAME; return GST_VAAPI_DECODER_STATUS_SUCCESS; } diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index ffc06d5723..207d99a6c7 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -1515,7 +1515,7 @@ error: drop_frame: priv->decoder_state = 0; priv->pic_structure = GST_H264_SEI_PIC_STRUCT_FRAME; - return GST_VAAPI_DECODER_STATUS_DROP_FRAME; + return (GstVaapiDecoderStatus) GST_VAAPI_DECODER_STATUS_DROP_FRAME; } static GstVaapiDecoderStatus @@ -3522,10 +3522,6 @@ decode_picture(GstVaapiDecoderH264 *decoder, GstVaapiDecoderUnit *unit) switch (sps->profile_idc) { case GST_H264_PROFILE_MULTIVIEW_HIGH: case GST_H264_PROFILE_STEREO_HIGH: - if (0) { - GST_DEBUG("drop picture from substream"); - return GST_VAAPI_DECODER_STATUS_DROP_FRAME; - } break; } diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c b/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c index a45ab8f792..bfa1d2c69b 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c @@ -241,7 +241,7 @@ error: drop_frame: priv->decoder_state = 0; - return GST_VAAPI_DECODER_STATUS_DROP_FRAME; + return (GstVaapiDecoderStatus) GST_VAAPI_DECODER_STATUS_DROP_FRAME; } static gboolean diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c index c3ab7a68a3..1bb2a2279e 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c @@ -550,7 +550,7 @@ error: drop_frame: priv->state &= GST_MPEG_VIDEO_STATE_VALID_SEQ_HEADERS; - return GST_VAAPI_DECODER_STATUS_DROP_FRAME; + return (GstVaapiDecoderStatus) GST_VAAPI_DECODER_STATUS_DROP_FRAME; } static GstVaapiDecoderStatus diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c index 2f2620bec6..68cb80c76c 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c @@ -518,7 +518,7 @@ decode_picture(GstVaapiDecoderMpeg4 *decoder, const guint8 *buf, guint buf_size) parser_result = gst_mpeg4_parse_video_object_plane(vop_hdr, sprite_trajectory, vol_hdr, buf, buf_size); /* Need to skip this frame if VOP was not coded */ if (GST_MPEG4_PARSER_OK == parser_result && !vop_hdr->coded) - return GST_VAAPI_DECODER_STATUS_DROP_FRAME; + return (GstVaapiDecoderStatus) GST_VAAPI_DECODER_STATUS_DROP_FRAME; } if (parser_result != GST_MPEG4_PARSER_OK) {