diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2016-10-06 11:44:11 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-12-05 11:03:35 +0200 |
commit | 291c6c0555f42389aad8195f43a6f782d62698dd (patch) | |
tree | db8d2336a427395264dd54b1c7fb5aeb32697835 | |
parent | 6b9caf034a3544633addd31c4efa136dc7331f04 (diff) | |
download | gstreamer-plugins-base-291c6c0555f42389aad8195f43a6f782d62698dd.tar.gz |
opusdec: interpret zero duration as unknown
This fixes missing audio when we get buffers with zero
duration, denoting unknown duration. When several such
buffers are received in a row, they're all at the same
timestamp, with zero duration.
https://bugzilla.gnome.org/show_bug.cgi?id=771723
-rw-r--r-- | ext/opus/gstopusdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c index 7e9947814..0d5f20627 100644 --- a/ext/opus/gstopusdec.c +++ b/ext/opus/gstopusdec.c @@ -540,7 +540,7 @@ opus_dec_chain_parse_data (GstOpusDec * dec, GstBuffer * buffer) GstClockTime aligned_missing_duration; GstClockTime missing_duration = GST_BUFFER_DURATION (bufd); - if (!GST_CLOCK_TIME_IS_VALID (missing_duration)) { + if (!GST_CLOCK_TIME_IS_VALID (missing_duration) || missing_duration == 0) { if (GST_CLOCK_TIME_IS_VALID (dec->last_known_buffer_duration)) { missing_duration = dec->last_known_buffer_duration; GST_WARNING_OBJECT (dec, |