mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 00:42:57 +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:
parent
a54f6717c2
commit
eb740673b8
@ -166,7 +166,9 @@ static void decode(struct sd *sd, struct demux_packet *packet)
|
|||||||
AVSubtitle sub;
|
AVSubtitle sub;
|
||||||
AVPacket pkt;
|
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
|
// Assume there are no bitmap subs that actually use duration==0 for
|
||||||
// hidden subtitle events.
|
// hidden subtitle events.
|
||||||
if (duration == 0)
|
if (duration == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user