summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-27 21:56:46 +0200
committerwm4 <wm4@nowhere>2014-05-27 21:58:07 +0200
commit22b16a40e58d17f1de5328bb3533631b22d0f4ad (patch)
tree2b0e55a276412b61e4ce415fabe474575e503bd9 /stream
parent96bc188172b87aa41310fe42a1415b53e173d6a4 (diff)
downloadmpv-22b16a40e58d17f1de5328bb3533631b22d0f4ad.tar.bz2
mpv-22b16a40e58d17f1de5328bb3533631b22d0f4ad.tar.xz
video: better handling for (very) broken timestamps
Sometimes, Matroska files store monotonic PTS for h264 tracks with b-frames, which means the decoder actually returns non-monotonic PTS. Handle this with an evil trick: if DTS is missing, set it to the PTS. Then the existing logic, which deals with falling back to DTS if PTS is broken. Actually, this trick is not so evil at all, because usually, PTS has no errors, and DTS is either always set, or always unset. So this _should_ provoke no regressions (famous last words). libavformat actually does something similar: it derives DTS from PTS in ways unknown to me. The result is very broken, but it causes the DTS fallback to become active, and thus happens to work. Also, prevent the heuristic from being active if PTS is merely monotonic instead of strictly-monotonic. Non-unique PTS is broken, but we can't fallback to DTS anyway in these cases. The specific mkv file that is fixed with this commit had the following fields set: Muxing application: libebml v1.3.0 + libmatroska v1.4.1 Writing application: mkvmerge v6.7.0 ('Back to the Ground') [...] But I know that this should also fix playback of mencoder produced mkv files.
Diffstat (limited to 'stream')
0 files changed, 0 insertions, 0 deletions