summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/librfb/gstrfbsrc.c7
-rw-r--r--gst/librfb/rfbdecoder.c6
-rw-r--r--gst/mpegtsparse/mpegtspacketizer.c31
3 files changed, 28 insertions, 16 deletions
diff --git a/gst/librfb/gstrfbsrc.c b/gst/librfb/gstrfbsrc.c
index b218fceb..a2b4eca8 100644
--- a/gst/librfb/gstrfbsrc.c
+++ b/gst/librfb/gstrfbsrc.c
@@ -192,11 +192,14 @@ gst_rfb_src_dispose (GObject * object)
static void
gst_rfb_property_set_version (GstRfbSrc * src, gchar * value)
{
+ gchar *major;
+ gchar *minor;
+
g_return_if_fail (src != NULL);
g_return_if_fail (value != NULL);
- gchar *major = g_strdup (value);
- gchar *minor = g_strrstr (value, ".");
+ major = g_strdup (value);
+ minor = g_strrstr (value, ".");
g_return_if_fail (minor != NULL);
diff --git a/gst/librfb/rfbdecoder.c b/gst/librfb/rfbdecoder.c
index 009e291b..0bc1fb2d 100644
--- a/gst/librfb/rfbdecoder.c
+++ b/gst/librfb/rfbdecoder.c
@@ -406,12 +406,13 @@ rfb_decoder_message_set_encodings (GSList * encodings_list)
{
guint8 *message = g_malloc0 (4 + 4 * g_slist_length (encodings_list));
+ guint32 *encoding_type;
message[0] = 0x02; /* message type */
RFB_SET_UINT16 (message + 2, g_slist_length (encodings_list)); /* number of encodings */
/* write all the encoding types */
- guint32 *encoding_type = (guint32 *) (message + 4);
+ encoding_type = (guint32 *) (message + 4);
while (encodings_list) {
RFB_SET_UINT32 (encoding_type, GPOINTER_TO_UINT (encodings_list->data));
@@ -434,6 +435,7 @@ static gboolean
rfb_decoder_state_set_encodings (RfbDecoder * decoder)
{
GSList *encoder_list = NULL;
+ guint8 *message;
GST_DEBUG ("entered set encodings");
@@ -449,7 +451,7 @@ rfb_decoder_state_set_encodings (RfbDecoder * decoder)
encoder_list =
g_slist_append (encoder_list, GUINT_TO_POINTER (ENCODING_TYPE_RAW));
- guint8 *message = rfb_decoder_message_set_encodings (encoder_list);
+ message = rfb_decoder_message_set_encodings (encoder_list);
rfb_decoder_send (decoder, message, 4 + 4 * g_slist_length (encoder_list));
diff --git a/gst/mpegtsparse/mpegtspacketizer.c b/gst/mpegtsparse/mpegtspacketizer.c
index 4876b2b8..cc361e61 100644
--- a/gst/mpegtsparse/mpegtspacketizer.c
+++ b/gst/mpegtsparse/mpegtspacketizer.c
@@ -600,15 +600,16 @@ mpegts_packetizer_parse_nit (MpegTSPacketizer * packetizer,
/* see if the buffer is large enough */
if (descriptors_loop_length) {
+ guint8 *networkname_descriptor;
+ GstMPEGDescriptor *mpegdescriptor;
+
if (data + descriptors_loop_length > end - 4) {
GST_WARNING ("PID %d invalid NIT descriptors loop length %d",
section->pid, descriptors_loop_length);
gst_structure_free (nit);
goto error;
}
- guint8 *networkname_descriptor;
- GstMPEGDescriptor *mpegdescriptor =
- gst_mpeg_descriptor_parse (data, descriptors_loop_length);
+ mpegdescriptor = gst_mpeg_descriptor_parse (data, descriptors_loop_length);
networkname_descriptor =
gst_mpeg_descriptor_find (mpegdescriptor, DESC_DVB_NETWORK_NAME);
if (networkname_descriptor != NULL) {
@@ -676,15 +677,17 @@ mpegts_packetizer_parse_nit (MpegTSPacketizer * packetizer,
g_free (transport_name);
if (descriptors_loop_length) {
+ GstMPEGDescriptor *mpegdescriptor;
+ guint8 *delivery;
+
if (data + descriptors_loop_length > end - 4) {
GST_WARNING ("PID %d invalid NIT entry %d descriptors loop length %d",
section->pid, transport_stream_id, descriptors_loop_length);
gst_structure_free (transport);
goto error;
}
- GstMPEGDescriptor *mpegdescriptor =
+ mpegdescriptor =
gst_mpeg_descriptor_parse (data, descriptors_loop_length);
- guint8 *delivery;
if ((delivery =
gst_mpeg_descriptor_find (mpegdescriptor,
@@ -944,10 +947,10 @@ mpegts_packetizer_parse_nit (MpegTSPacketizer * packetizer,
GstStructure *channel;
GValue channel_value = { 0 };
guint16 service_id = GST_READ_UINT16_BE (current_pos);
+ guint16 logical_channel_number;
current_pos += 2;
- guint16 logical_channel_number =
- GST_READ_UINT16_BE (current_pos) & 0x03ff;
+ logical_channel_number = GST_READ_UINT16_BE (current_pos) & 0x03ff;
channel =
gst_structure_new ("channels", "service-id", G_TYPE_UINT,
service_id, "logical-channel-number", G_TYPE_UINT,
@@ -1109,14 +1112,16 @@ mpegts_packetizer_parse_sdt (MpegTSPacketizer * packetizer,
g_free (service_name);
if (descriptors_loop_length) {
+ guint8 *service_descriptor;
+ GstMPEGDescriptor *mpegdescriptor;
+
if (data + descriptors_loop_length > end - 4) {
GST_WARNING ("PID %d invalid SDT entry %d descriptors loop length %d",
section->pid, service_id, descriptors_loop_length);
gst_structure_free (service);
goto error;
}
- guint8 *service_descriptor;
- GstMPEGDescriptor *mpegdescriptor =
+ mpegdescriptor =
gst_mpeg_descriptor_parse (data, descriptors_loop_length);
service_descriptor =
gst_mpeg_descriptor_find (mpegdescriptor, DESC_DVB_SERVICE);
@@ -1333,15 +1338,17 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer * packetizer,
g_free (event_name);
if (descriptors_loop_length) {
+ guint8 *event_descriptor;
+ GArray *component_descriptors;
+ GstMPEGDescriptor *mpegdescriptor;
+
if (data + descriptors_loop_length > end - 4) {
GST_WARNING ("PID %d invalid EIT descriptors loop length %d",
section->pid, descriptors_loop_length);
gst_structure_free (event);
goto error;
}
- guint8 *event_descriptor;
- GArray *component_descriptors;
- GstMPEGDescriptor *mpegdescriptor =
+ mpegdescriptor =
gst_mpeg_descriptor_parse (data, descriptors_loop_length);
event_descriptor =
gst_mpeg_descriptor_find (mpegdescriptor, DESC_DVB_SHORT_EVENT);