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
This commit is contained in:
Vincent Penquerc'h 2016-10-06 11:44:11 +01:00 committed by Sebastian Dröge
parent a6ced9cbc8
commit b0866b9cc1

View file

@ -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,