mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
mpegvideoparse: only apply repeat count when set
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
This commit is contained in:
parent
85e45a09e2
commit
a9f46ed059
1 changed files with 2 additions and 1 deletions
|
@ -756,7 +756,8 @@ gst_mpegv_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue