mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
opusdec: light cleanup
This commit is contained in:
parent
95ae14f8b4
commit
de87d061fc
1 changed files with 3 additions and 3 deletions
|
@ -248,8 +248,8 @@ opus_dec_chain_parse_data (GstOpusDec * dec, GstBuffer * buf)
|
||||||
opus_packet_get_samples_per_frame (data,
|
opus_packet_get_samples_per_frame (data,
|
||||||
dec->sample_rate) * opus_packet_get_nb_frames (data, size);
|
dec->sample_rate) * opus_packet_get_nb_frames (data, size);
|
||||||
packet_size = samples * dec->n_channels * 2;
|
packet_size = samples * dec->n_channels * 2;
|
||||||
GST_DEBUG ("bandwidth %d", opus_packet_get_bandwidth (data));
|
GST_DEBUG_OBJECT (dec, "bandwidth %d", opus_packet_get_bandwidth (data));
|
||||||
GST_DEBUG ("samples %d", samples);
|
GST_DEBUG_OBJECT (dec, "samples %d", samples);
|
||||||
|
|
||||||
res = gst_pad_alloc_buffer_and_set_caps (GST_AUDIO_DECODER_SRC_PAD (dec),
|
res = gst_pad_alloc_buffer_and_set_caps (GST_AUDIO_DECODER_SRC_PAD (dec),
|
||||||
GST_BUFFER_OFFSET_NONE, packet_size,
|
GST_BUFFER_OFFSET_NONE, packet_size,
|
||||||
|
@ -377,7 +377,7 @@ gst_opus_dec_handle_frame (GstAudioDecoder * adec, GstBuffer * buf)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Otherwise fall back to packet counting and assume that the
|
/* Otherwise fall back to packet counting and assume that the
|
||||||
* first two packets are the headers. */
|
* first two packets might be the headers, checking magic. */
|
||||||
switch (dec->packetno) {
|
switch (dec->packetno) {
|
||||||
case 0:
|
case 0:
|
||||||
if (gst_opus_dec_is_header (buf, "OpusHead", 8)) {
|
if (gst_opus_dec_is_header (buf, "OpusHead", 8)) {
|
||||||
|
|
Loading…
Reference in a new issue