mov: Change DTS-based seek into CTS-based seek.
authorYusuke Nakamura <muken.the.vfrmaniac@gmail.com>
Tue, 27 Jan 2015 10:15:37 +0000 (19:15 +0900)
committerMartin Storsjö <martin@martin.st>
Sun, 15 Feb 2015 19:26:04 +0000 (21:26 +0200)
commit4abfa387b8234736f6e0e541951e3d5eb60eb843
treed8631f05c87759eba8a3eaeb5a01b4d1b8ab480b
parent51ca3cb604a7585a7cff35d4b954794508955c19
mov: Change DTS-based seek into CTS-based seek.

CTS-based seek is reasonable since player requests frames in output order
not coded order.

This change fixes seek to a keyframe within consecutive keyframes.
Let's say P[0|-1] and P[1|0], here x and y inside [x|y] are PTS and DTS
respectively, and both two frames are a keyframe. If you try to seek on
PTS=0, i.e. P[0|-1], you'll get P[1|0] if the demuxer is DTS based. This
is obviously undesirable.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/mov.c