diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2015-02-18 11:46:11 +0200 |
---|---|---|
committer | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2015-02-18 11:46:11 +0200 |
commit | 671b1ea305843eb747b0edcb62e0fca0e1471019 (patch) | |
tree | c157b443c4bf6e68b1a194e20d4058dcd7318b7a /gst-libs/gst/vaapi | |
parent | ce4d3355e151ddfd055450000ea293b7a089ed33 (diff) | |
download | gst-vaapi-671b1ea305843eb747b0edcb62e0fca0e1471019.tar.gz |
Fix compiler warnings
This patch fixes some warnings that gcc 4.9 reports.
https://bugzilla.gnome.org/show_bug.cgi?id=744411
Diffstat (limited to 'gst-libs/gst/vaapi')
-rw-r--r-- | gst-libs/gst/vaapi/Makefile.am | 2 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapibufferproxy.c | 2 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder.c | 3 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 3 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidisplay.c | 2 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c | 22 |
6 files changed, 6 insertions, 28 deletions
diff --git a/gst-libs/gst/vaapi/Makefile.am b/gst-libs/gst/vaapi/Makefile.am index 8332af4d..57b83135 100644 --- a/gst-libs/gst/vaapi/Makefile.am +++ b/gst-libs/gst/vaapi/Makefile.am @@ -454,7 +454,6 @@ libgstvaapi_wayland_@GST_API_VERSION@_la_CFLAGS = \ $(GST_VIDEO_CFLAGS) \ $(WAYLAND_CFLAGS) \ $(LIBVA_WAYLAND_CFLAGS) \ - $(top_builddir)/gst-libs/gst/video/libgstvaapi-videoutils.la \ $(NULL) libgstvaapi_wayland_@GST_API_VERSION@_la_LIBADD = \ @@ -464,6 +463,7 @@ libgstvaapi_wayland_@GST_API_VERSION@_la_LIBADD = \ $(WAYLAND_LIBS) \ $(LIBVA_WAYLAND_LIBS) \ libgstvaapi-$(GST_API_VERSION).la \ + $(top_builddir)/gst-libs/gst/video/libgstvaapi-videoutils.la \ $(NULL) libgstvaapi_wayland_@GST_API_VERSION@_la_LDFLAGS = \ diff --git a/gst-libs/gst/vaapi/gstvaapibufferproxy.c b/gst-libs/gst/vaapi/gstvaapibufferproxy.c index 22e17f2a..c8904a72 100644 --- a/gst-libs/gst/vaapi/gstvaapibufferproxy.c +++ b/gst-libs/gst/vaapi/gstvaapibufferproxy.c @@ -286,7 +286,7 @@ gst_vaapi_buffer_proxy_get_type (GstVaapiBufferProxy * proxy) guintptr gst_vaapi_buffer_proxy_get_handle (GstVaapiBufferProxy * proxy) { - g_return_val_if_fail (proxy != NULL, NULL); + g_return_val_if_fail (proxy != NULL, 0); return GST_VAAPI_BUFFER_PROXY_HANDLE (proxy); } diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c index fde84508..3ef4cbab 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder.c @@ -908,8 +908,9 @@ gst_interlace_mode_to_string (GstVideoInterlaceMode mode) return "interleaved"; case GST_VIDEO_INTERLACE_MODE_MIXED: return "mixed"; + default: + return "<unknown>"; } - return "<unknown>"; } void diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index 9730e124..ffc06d57 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -2561,7 +2561,7 @@ exec_picture_refs_modification_1( GstH264RefPicListModification *ref_pic_list_modification; guint num_ref_pic_list_modifications; GstVaapiPictureH264 **ref_list; - guint *ref_list_count_ptr, ref_list_count, ref_list_idx = 0; + guint *ref_list_count_ptr, ref_list_idx = 0; const guint16 *view_ids = NULL; guint i, j, n, num_refs, num_view_ids = 0; gint found_ref_idx; @@ -2611,7 +2611,6 @@ exec_picture_refs_modification_1( } } } - ref_list_count = *ref_list_count_ptr; if (!GST_VAAPI_PICTURE_IS_FRAME(picture)) { MaxPicNum = 1 << (sps->log2_max_frame_num_minus4 + 5); // 2 * MaxFrameNum diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.c b/gst-libs/gst/vaapi/gstvaapidisplay.c index 0115c746..fc371029 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay.c +++ b/gst-libs/gst/vaapi/gstvaapidisplay.c @@ -2134,7 +2134,7 @@ gst_vaapi_display_has_opengl (GstVaapiDisplay * display) { GstVaapiDisplayClass *klass; - g_return_val_if_fail (display != NULL, NULL); + g_return_val_if_fail (display != NULL, FALSE); klass = GST_VAAPI_DISPLAY_GET_CLASS (display); return (klass->display_type == GST_VAAPI_DISPLAY_TYPE_GLX); diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c b/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c index 785b3bb4..f959b268 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c @@ -134,8 +134,6 @@ generate_sampling_factors (GstVaapiEncoderJpeg * encoder) static GstVaapiEncoderStatus ensure_profile (GstVaapiEncoderJpeg * encoder) { - GstVaapiProfile profile; - /* Always start from "simple" profile for maximum compatibility */ encoder->profile = GST_VAAPI_PROFILE_JPEG_BASELINE; @@ -210,9 +208,7 @@ fill_picture (GstVaapiEncoderJpeg * encoder, GstVaapiEncPicture * picture, GstVaapiCodedBuffer * codedbuf, GstVaapiSurfaceProxy * surface) { - GstVaapiEncoder *const base_encoder = GST_VAAPI_ENCODER_CAST (encoder); VAEncPictureParameterBufferJPEG *const pic_param = picture->param; - GstVideoInfo *vinfo = GST_VAAPI_ENCODER_VIDEO_INFO (encoder); memset (pic_param, 0, sizeof (VAEncPictureParameterBufferJPEG)); @@ -572,13 +568,6 @@ bs_write_jpeg_header (GstBitWriter * bs, GstVaapiEncoderJpeg * encoder, gst_bit_writer_put_bits_uint8 (bs, 0, 4); //0 for Baseline return TRUE; - - /* ERRORS */ -bs_error: - { - GST_WARNING ("failed to write Jpeg raw data header"); - return FALSE; - } } static gboolean @@ -611,14 +600,6 @@ add_packed_header (GstVaapiEncoderJpeg * encoder, GstVaapiEncPicture * picture) gst_bit_writer_clear (&bs, TRUE); return TRUE; - - /* ERRORS */ -bs_error: - { - GST_WARNING ("failed to write Packed Raw Data header"); - gst_bit_writer_clear (&bs, TRUE); - return FALSE; - } } static gboolean @@ -722,9 +703,6 @@ gst_vaapi_encoder_jpeg_reconfigure (GstVaapiEncoder * base_encoder) generate_sampling_factors (encoder); return set_context_info (base_encoder); - -error: - return GST_VAAPI_ENCODER_STATUS_ERROR_OPERATION_FAILED; } static gboolean |