From a5bceca6e4651d1f71fc64043b4751a8d7c63045 Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Tue, 11 Aug 2015 13:38:59 +0900 Subject: [PATCH] Fix prevent defects Change-Id: I451b34fc138c5c63ed87ef01456f3faa2852a788 --- gst/rtsp-server/gstwfdmessage.c | 4 ++-- gst/rtsp-server/rtsp-client-wfd.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gst/rtsp-server/gstwfdmessage.c b/gst/rtsp-server/gstwfdmessage.c index 1cfb924..1c08c6e 100755 --- a/gst/rtsp-server/gstwfdmessage.c +++ b/gst/rtsp-server/gstwfdmessage.c @@ -2105,7 +2105,7 @@ gst_wfd_message_get_supported_video_format (GstWFDMessage * msg, *v_codec = GST_WFD_VIDEO_H264; *v_native = msg->video_formats->list->native & 0x7; nativeindex = msg->video_formats->list->native >> 3; - *v_native_resolution = 1 << nativeindex; + *v_native_resolution = ((guint64) 1) << nativeindex; *v_profile = msg->video_formats->list->H264_codec.profile; *v_level = msg->video_formats->list->H264_codec.level; *v_max_height = msg->video_formats->list->H264_codec.max_hres; @@ -2149,7 +2149,7 @@ gst_wfd_message_get_prefered_video_format (GstWFDMessage * msg, *v_codec = GST_WFD_VIDEO_H264; *v_native = msg->video_formats->list->native & 0x7; nativeindex = msg->video_formats->list->native >> 3; - *v_native_resolution = 1 << nativeindex; + *v_native_resolution = ((guint64) 1) << nativeindex; *v_profile = msg->video_formats->list->H264_codec.profile; *v_level = msg->video_formats->list->H264_codec.level; *v_max_height = msg->video_formats->list->H264_codec.max_hres; diff --git a/gst/rtsp-server/rtsp-client-wfd.c b/gst/rtsp-server/rtsp-client-wfd.c index 57a158e..a18fa1f 100644 --- a/gst/rtsp-server/rtsp-client-wfd.c +++ b/gst/rtsp-server/rtsp-client-wfd.c @@ -103,9 +103,9 @@ struct _GstRTSPWFDClientPrivate guint64 cNativeResolution; guint64 video_resolution_supported; gint video_native_resolution; - guint cCEAResolution; - guint cVESAResolution; - guint cHHResolution; + guint64 cCEAResolution; + guint64 cVESAResolution; + guint64 cHHResolution; guint cProfile; guint cLevel; guint32 cMaxHeight; @@ -508,7 +508,7 @@ wfd_get_prefered_resolution (guint64 srcResolution, for (i = 0; i < 32; i++) { if (((sinkResolution << i) & 0x80000000) && ((srcResolution << i) & 0x80000000)) { - resolution = (0x00000001 << (31 - i)); + resolution = ((guint64) 0x00000001 << (31 - i)); break; } } -- 2.7.4