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