gst-plugins-bad: mpegdemux: Fix unused-but-set warnings

Edward Hervey bilboed at gmail.com
Wed Jul 13 01:57:25 PDT 2011


On Tue, 2011-07-12 at 15:23 -0700, Olivier Crête wrote:
> Module: gst-plugins-bad
> Branch: master
> Commit: d7a774cc44792198f058e7ca26926558ba0ee4d7
> URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=d7a774cc44792198f058e7ca26926558ba0ee4d7
> 
> Author: Olivier Crête <olivier.crete at collabora.com>
> Date:   Tue Jul 12 17:53:33 2011 -0400
> 
> mpegdemux: Fix unused-but-set warnings
> 
> ---

  Same comments as for the mpegtsdemux commit

> 
>  gst/mpegtsdemux/mpegtspacketizer.c |   29 +++++++++++------------------
>  gst/mpegtsdemux/tsdemux.c          |    4 ----
>  2 files changed, 11 insertions(+), 22 deletions(-)
> 
> diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c
> index 87a57c6..2c026e6 100644
> --- a/gst/mpegtsdemux/mpegtspacketizer.c
> +++ b/gst/mpegtsdemux/mpegtspacketizer.c
> @@ -376,7 +376,7 @@ static gboolean
>  mpegts_packetizer_parse_descriptors (MpegTSPacketizer2 * packetizer,
>      guint8 ** buffer, guint8 * buffer_end, GValueArray * descriptors)
>  {
> -  guint8 tag, length;
> +  guint8 length;
>    guint8 *data;
>    GValue value = { 0 };
>    GString *desc;
> @@ -384,7 +384,6 @@ mpegts_packetizer_parse_descriptors (MpegTSPacketizer2 * packetizer,
>    data = *buffer;
>  
>    while (data < buffer_end) {
> -    tag = *data++;
>      length = *data++;
>  
>      if (data + length > buffer_end) {
> @@ -393,7 +392,7 @@ mpegts_packetizer_parse_descriptors (MpegTSPacketizer2 * packetizer,
>        goto error;
>      }
>  
> -    /* include tag and length */
> +    /* include length */
>      desc = g_string_new_len ((gchar *) data - 2, length + 2);
>      data += length;
>      /* G_TYPE_GSTING is a GBoxed type and is used so properly marshalled from python */
> @@ -1335,7 +1334,6 @@ mpegts_packetizer_parse_sdt (MpegTSPacketizer2 * packetizer,
>    guint16 transport_stream_id, original_network_id, service_id;
>    guint tmp;
>    guint sdt_info_length;
> -  gboolean EIT_schedule, EIT_present_following;
>    guint8 running_status;
>    gboolean scrambled;
>    guint descriptors_loop_length;
> @@ -1406,9 +1404,6 @@ mpegts_packetizer_parse_sdt (MpegTSPacketizer2 * packetizer,
>      service_id = GST_READ_UINT16_BE (data);
>      data += 2;
>  
> -    EIT_schedule = ((*data & 0x02) == 2);
> -    EIT_present_following = (*data & 0x01) == 1;
> -
>      data += 1;
>      tmp = GST_READ_UINT16_BE (data);
>  
> @@ -1539,7 +1534,6 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer2 * packetizer,
>    guint transport_stream_id, original_network_id;
>    gboolean free_ca_mode;
>    guint event_id, running_status;
> -  guint64 start_and_duration;
>    guint16 mjd;
>    guint year, month, day, hour, minute, second;
>    guint duration;
> @@ -1616,7 +1610,6 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer2 * packetizer,
>  
>      event_id = GST_READ_UINT16_BE (data);
>      data += 2;
> -    start_and_duration = GST_READ_UINT64_BE (data);
>      duration_ptr = data + 5;
>      utc_ptr = data + 2;
>      mjd = GST_READ_UINT16_BE (data);
> @@ -1760,7 +1753,7 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer2 * packetizer,
>            GValue component_value = { 0 };
>            gint widescreen = 0;  /* 0 for 4:3, 1 for 16:9, 2 for > 16:9 */
>            gint freq = 25;       /* 25 or 30 measured in Hertz */
> -          gboolean highdef = FALSE;
> +          /* gboolean highdef = FALSE; */
>            gboolean panvectors = FALSE;
>            const gchar *comptype = "";
>  
> @@ -1807,46 +1800,46 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer2 * packetizer,
>                    break;
>                  case 0x09:
>                    widescreen = 0;
> -                  highdef = TRUE;
> +                  /* highdef = TRUE; */
>                    freq = 25;
>                    break;
>                  case 0x0A:
>                    widescreen = 1;
> -                  highdef = TRUE;
> +                  /* highdef = TRUE; */
>                    panvectors = TRUE;
>                    freq = 25;
>                    break;
>                  case 0x0B:
>                    widescreen = 1;
> -                  highdef = TRUE;
> +                  /* highdef = TRUE; */
>                    panvectors = FALSE;
>                    freq = 25;
>                    break;
>                  case 0x0C:
>                    widescreen = 2;
> -                  highdef = TRUE;
> +                  /* highdef = TRUE; */
>                    freq = 25;
>                    break;
>                  case 0x0D:
>                    widescreen = 0;
> -                  highdef = TRUE;
> +                  /* highdef = TRUE; */
>                    freq = 30;
>                    break;
>                  case 0x0E:
>                    widescreen = 1;
> -                  highdef = TRUE;
> +                  /* highdef = TRUE; */
>                    panvectors = TRUE;
>                    freq = 30;
>                    break;
>                  case 0x0F:
>                    widescreen = 1;
> -                  highdef = TRUE;
> +                  /* highdef = TRUE; */
>                    panvectors = FALSE;
>                    freq = 30;
>                    break;
>                  case 0x10:
>                    widescreen = 2;
> -                  highdef = TRUE;
> +                  /* highdef = TRUE; */
>                    freq = 30;
>                    break;
>                }
> diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
> index 9894d8d..05a88e1 100644
> --- a/gst/mpegtsdemux/tsdemux.c
> +++ b/gst/mpegtsdemux/tsdemux.c
> @@ -865,7 +865,6 @@ gst_ts_demux_do_seek (MpegTSBase * base, GstEvent * event, guint16 pid)
>    GstTSDemux *demux = (GstTSDemux *) base;
>    GstFlowReturn res = GST_FLOW_ERROR;
>    gdouble rate;
> -  gboolean accurate, flush;
>    GstFormat format;
>    GstSeekFlags flags;
>    GstSeekType start_type, stop_type;
> @@ -884,9 +883,6 @@ gst_ts_demux_do_seek (MpegTSBase * base, GstEvent * event, guint16 pid)
>        " stop: %" GST_TIME_FORMAT, rate, GST_TIME_ARGS (start),
>        GST_TIME_ARGS (stop));
>  
> -  accurate = flags & GST_SEEK_FLAG_ACCURATE;
> -  flush = flags & GST_SEEK_FLAG_FLUSH;
> -
>    if (flags & (GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_SKIP)) {
>      GST_WARNING ("seek flags 0x%x are not supported", (int) flags);
>      goto done;
> 
> _______________________________________________
> gstreamer-commits mailing list
> gstreamer-commits at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-commits




More information about the gstreamer-devel mailing list