Opened 16 months ago

Last modified 16 months ago

#10135 new defect

matroska/ass: Wrong AVPacket duration set for ass events with 0 duration

Reported by: enen92 Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mkv, ass
Cc: enen92 Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

Reported to Kodi (https://github.com/xbmc/xbmc/issues/21625) but the root cause seems to be in libav. The subtitle AVPackets returned from the demuxer have a duration > 0 that seems to result from the pts value that the next subtitle is received.

Those subtitle events have start and end times equal to 0 and should not be shown:

Dialogue: 0,0:00:00.00,0:00:00.00,DCMain,CONAN,0000,0000,0000,,[ed]
Dialogue: 0,0:00:00.00,0:00:00.00,DCMain,KOGORO,0000,0000,0000,,[eyecatch]
Dialogue: 0,0:00:00.00,0:00:00.00,DCMain,,0000,0000,0000,,Detective Conan Episode 1047 "The \NRed Sheep's Eerie Game (Part One)"
Dialogue: 0,0:00:00.00,0:00:00.00,DCMain,CONAN,0000,0000,0000,,[op]

Initially matroskadec sets the start and duration times correctly (both 0) but at some point along the chain the duration is changed.

How to reproduce:

% ffplay -vf subtitles=filename="ass_sample.mkv" ass_sample.mkv

ffmpeg version master built on linux (although it happens on all platforms)

The entries "[ed]", "[eyecatch]", "Detective Conan Episode 1047 "The \NRed Sheep's Eerie Game (Part One)", "[op]" should not be shown. Opening the same file with mpv shows the correct behaviour (they don't rely on the duration from AVPacket)

Change History (1)

comment:1 by enen92, 16 months ago

Sample file is here (14Mb exceed the upload limit of the bugtracker):

https://www.mediafire.com/file/d6itonjk5z21j0r/1047_%255BErai-raws%255D_%25281%2529-001.mkv/file

Last edited 16 months ago by enen92 (previous) (diff)
Note: See TracTickets for help on using tickets.