1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 00:02:13 +00:00

sd_lavc: add a comment about duration==0 handling

Basically, this information is useless, because some muxers (hurr
libavformat) write bogus information anyway. This means if we e.g. see
PGS packets in mkv with duration explicitly set to 0, we must not trust
that value anyway. (The FFmpeg API problem is leaking into files, how
nice.)
This commit is contained in:
wm4 2016-04-02 17:35:42 +02:00
parent a54f6717c2
commit eb740673b8

View File

@ -166,7 +166,9 @@ static void decode(struct sd *sd, struct demux_packet *packet)
AVSubtitle sub;
AVPacket pkt;
// libavformat sets duration==0, even if the duration is unknown.
// libavformat sets duration==0, even if the duration is unknown. Some files
// also have actually subtitle packets with duration explicitly set to 0
// (yes, at least some of such mkv files were muxed by libavformat).
// Assume there are no bitmap subs that actually use duration==0 for
// hidden subtitle events.
if (duration == 0)