From 2e0e11867634d513a448cdf5d07984cf81e0a0ed Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Fri, 25 Nov 2011 12:46:55 +0000 Subject: [PATCH] opusparse: remove dead assigments We now only keep a ref to the headers for later reuse. --- ext/opus/gstopusparse.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ext/opus/gstopusparse.c b/ext/opus/gstopusparse.c index 8627f93028..fae62007e3 100644 --- a/ext/opus/gstopusparse.c +++ b/ext/opus/gstopusparse.c @@ -279,16 +279,11 @@ gst_opus_parse_parse_frame (GstBaseParse * base, GstBaseParseFrame * frame) if (!parse->header_sent) { GstCaps *caps; - guint8 channels, channel_mapping_family, channel_mapping[256]; - const guint8 *data = GST_BUFFER_DATA (frame->buffer); + guint8 channels; /* Opus streams can decode to 1 or 2 channels, so use the header value if we have one, or 2 otherwise */ if (is_idheader) { - channels = data[9]; - channel_mapping_family = data[18]; - /* header probing will already have done the size check */ - memcpy (channel_mapping, GST_BUFFER_DATA (frame->buffer) + 21, channels); gst_buffer_replace (&parse->id_header, frame->buffer); GST_DEBUG_OBJECT (parse, "Found ID header, keeping"); return GST_BASE_PARSE_FLOW_DROPPED; @@ -305,6 +300,7 @@ gst_opus_parse_parse_frame (GstBaseParse * base, GstBaseParseFrame * frame) gst_opus_header_create_caps_from_headers (&caps, &parse->headers, parse->id_header, parse->comment_header); } else { + guint8 channel_mapping_family, channel_mapping[256]; GST_INFO_OBJECT (parse, "No headers, blindly setting up canonical stereo"); channels = 2;