From b0866b9cc1441cbdd95c599f88d2574b3dfd5b7d Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Thu, 6 Oct 2016 11:44:11 +0100 Subject: [PATCH] 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 --- ext/opus/gstopusdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c index f840c6b5ad..304e6bf8a2 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,