diff options
author | wm4 <wm4@nowhere> | 2016-04-02 17:35:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-02 17:35:42 +0200 |
commit | eb740673b8a110f5d18879ba0080e9d3f13387d0 (patch) | |
tree | 1338d9dd487b925b9fd32c162a153ce95785210e /sub/sd_lavc.c | |
parent | a54f6717c2a27be104c70a8e3dca6ac9eda1ba31 (diff) | |
download | mpv-eb740673b8a110f5d18879ba0080e9d3f13387d0.tar.bz2 mpv-eb740673b8a110f5d18879ba0080e9d3f13387d0.tar.xz |
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.)
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r-- | sub/sd_lavc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c index 74d19f8369..f0c51ceaa6 100644 --- a/sub/sd_lavc.c +++ b/sub/sd_lavc.c @@ -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) |