mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
mpeg2: fix interpolation of GOP TSN from new PTS.
New GOP TSN base could be mis-calculated. In particular, this fixes decoding of uruseiyatsura.vob from <http://samples.mplayerhq.hu/>.
This commit is contained in:
parent
9c8b85b3c7
commit
2d36f6199e
1 changed files with 2 additions and 1 deletions
|
@ -128,7 +128,8 @@ pts_sync(PTSGenerator *tsg, GstClockTime gop_pts)
|
|||
/* Interpolate GOP TSN from this valid PTS */
|
||||
if (GST_CLOCK_TIME_IS_VALID(tsg->gop_pts))
|
||||
gop_tsn = tsg->gop_tsn + gst_util_uint64_scale(
|
||||
gop_pts - tsg->gop_pts, tsg->fps_n, GST_SECOND * tsg->fps_d);
|
||||
gop_pts - tsg->gop_pts + pts_get_duration(tsg, 1) - 1,
|
||||
tsg->fps_n, GST_SECOND * tsg->fps_d);
|
||||
else
|
||||
gop_tsn = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue