diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2016-09-26 10:50:52 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-12-05 11:03:40 +0200 |
commit | be96016d5f7aec7b6791c6d44e16f37383d6bc31 (patch) | |
tree | dca4f3d2af0eb343912ba5afd44005430a4c9c25 | |
parent | 291c6c0555f42389aad8195f43a6f782d62698dd (diff) | |
download | gstreamer-plugins-base-be96016d5f7aec7b6791c6d44e16f37383d6bc31.tar.gz |
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
-rw-r--r-- | ext/opus/gstopusdec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c index 0d5f20627..304e6bf8a 100644 --- a/ext/opus/gstopusdec.c +++ b/ext/opus/gstopusdec.c @@ -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 = |