When there is no extension header, the repeat_count variable is left to 0 and
then the duration on the output buffers is calculated wrongly. Because the
duration is used to interpolate output timestamps, the output timestamps are
also wrong, causing bad framerates.
See https://bugzilla.gnome.org/show_bug.cgi?id=681535
GST_BUFFER_DURATION (buffer) = 0;
}
- if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer))) {
+ if (mpvparse->frame_repeat_count
+ && GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer))) {
GST_BUFFER_DURATION (buffer) =
(1 + mpvparse->frame_repeat_count) * GST_BUFFER_DURATION (buffer) / 2;
}