mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
opusparse: remove dead assigments
We now only keep a ref to the headers for later reuse.
This commit is contained in:
parent
f78c83a0b6
commit
2e0e118676
1 changed files with 2 additions and 6 deletions
|
@ -279,16 +279,11 @@ gst_opus_parse_parse_frame (GstBaseParse * base, GstBaseParseFrame * frame)
|
||||||
|
|
||||||
if (!parse->header_sent) {
|
if (!parse->header_sent) {
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
guint8 channels, channel_mapping_family, channel_mapping[256];
|
guint8 channels;
|
||||||
const guint8 *data = GST_BUFFER_DATA (frame->buffer);
|
|
||||||
|
|
||||||
/* Opus streams can decode to 1 or 2 channels, so use the header
|
/* Opus streams can decode to 1 or 2 channels, so use the header
|
||||||
value if we have one, or 2 otherwise */
|
value if we have one, or 2 otherwise */
|
||||||
if (is_idheader) {
|
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_buffer_replace (&parse->id_header, frame->buffer);
|
||||||
GST_DEBUG_OBJECT (parse, "Found ID header, keeping");
|
GST_DEBUG_OBJECT (parse, "Found ID header, keeping");
|
||||||
return GST_BASE_PARSE_FLOW_DROPPED;
|
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,
|
gst_opus_header_create_caps_from_headers (&caps, &parse->headers,
|
||||||
parse->id_header, parse->comment_header);
|
parse->id_header, parse->comment_header);
|
||||||
} else {
|
} else {
|
||||||
|
guint8 channel_mapping_family, channel_mapping[256];
|
||||||
GST_INFO_OBJECT (parse,
|
GST_INFO_OBJECT (parse,
|
||||||
"No headers, blindly setting up canonical stereo");
|
"No headers, blindly setting up canonical stereo");
|
||||||
channels = 2;
|
channels = 2;
|
||||||
|
|
Loading…
Reference in a new issue