From 43fea50c8a3eeef2539f852c02fe64e5f0d55c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 8 May 2013 15:42:01 +0100 Subject: [PATCH] smoothstreaming: pass width, height, channels and rate as integer g_ascii_strtoull() returns a long long integer, but we need to pass a normal int to gst_structure_set() for fields of G_TYPE_INT, so cast appropriately. --- ext/smoothstreaming/gstmssmanifest.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c index 510bcee240..4879fa29bc 100644 --- a/ext/smoothstreaming/gstmssmanifest.c +++ b/ext/smoothstreaming/gstmssmanifest.c @@ -472,12 +472,14 @@ _gst_mss_stream_video_caps_from_qualitylevel_xml (xmlNodePtr node) structure = gst_caps_get_structure (caps, 0); - if (max_width) + if (max_width) { gst_structure_set (structure, "width", G_TYPE_INT, - g_ascii_strtoull (max_width, NULL, 10), NULL); - if (max_height) + (int) g_ascii_strtoull (max_width, NULL, 10), NULL); + } + if (max_height) { gst_structure_set (structure, "height", G_TYPE_INT, - g_ascii_strtoull (max_height, NULL, 10), NULL); + (int) g_ascii_strtoull (max_height, NULL, 10), NULL); + } if (codec_data && strlen (codec_data)) { if (strcmp (fourcc, "H264") == 0 || strcmp (fourcc, "AVC1") == 0) { @@ -574,13 +576,14 @@ _gst_mss_stream_audio_caps_from_qualitylevel_xml (xmlNodePtr node) goto end; structure = gst_caps_get_structure (caps, 0); - - if (channels) + if (channels) { gst_structure_set (structure, "channels", G_TYPE_INT, - g_ascii_strtoull (channels, NULL, 10), NULL); - if (rate) + (int) g_ascii_strtoull (channels, NULL, 10), NULL); + } + if (rate) { gst_structure_set (structure, "rate", G_TYPE_INT, - g_ascii_strtoull (rate, NULL, 10), NULL); + (int) g_ascii_strtoull (rate, NULL, 10), NULL); + } if (codec_data && strlen (codec_data)) { GstBuffer *buffer = gst_buffer_from_hex_string ((gchar *) codec_data);