mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
opusdec: fix "buffer too small" error
Always supply a buffer with max size to the decoder, as we can't really decide how many samples will be in the lost packet based on the timestamps we get. https://bugzilla.gnome.org/show_bug.cgi?id=771723
This commit is contained in:
parent
028b16bb67
commit
a6ced9cbc8
1 changed files with 3 additions and 4 deletions
|
@ -590,12 +590,11 @@ opus_dec_chain_parse_data (GstOpusDec * dec, GstBuffer * buffer)
|
|||
" num frame samples: %d new leftover: %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (aligned_missing_duration), samples,
|
||||
GST_TIME_ARGS (dec->leftover_plc_duration));
|
||||
} else {
|
||||
/* use maximum size (120 ms) as the number of returned samples is
|
||||
not constant over the stream. */
|
||||
samples = 120 * dec->sample_rate / 1000;
|
||||
}
|
||||
|
||||
/* use maximum size (120 ms) as the number of returned samples is
|
||||
not constant over the stream. */
|
||||
samples = 120 * dec->sample_rate / 1000;
|
||||
packet_size = samples * dec->n_channels * 2;
|
||||
|
||||
outbuf =
|
||||
|
|
Loading…
Reference in a new issue