Opened 11 years ago

#1284 new defect

mplayer can't detect ass subtitles with a lot of empty lines at the beginning

Reported by: rvm@… Owned by: reimar
Priority: normal Component: core
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

MPlayer fails to load this subtitle file:
http://ggkthx.org/Scripts/MacF/MacrossF%20-%2023.ass

mplayer video.avi -sub MacrossF\ -\ 23.ass

MPlayer dev-SVN-r27640-3.3.4 (C) 2000-2008 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3400+ (Family: 15, Model: 4, Stepping: 10)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2
/home/ricardo/.fonts/arialbd.ttf doesn't look like a bitmap font description, ignoring.
Cannot load bitmap font: /home/ricardo/.fonts/arialbd.ttf
mplayer: could not connect to socket
mplayer: Permission denied
Failed to open LIRC support. You will not be able to use your remote control.

Playing video.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [XVID] 512x368 12bpp 25.000 fps 1438.3 kbps (175.6 kbyte/s)
Clip info:

Software: VirtualDubMod? 1.5.10.2 (build 2540/release)

SUB: Could not determine file format
Cannot load subtitles: MacrossF - 23.ass

(The subtitles work ok if I use -ass)

Looking at the subtitle file I realized it has a lot of empty lines (more than 200) just after this:
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text

If I remove those empty lines then mplayer can load the subtitle file.

I think those empty lines make the function sub_autodetect() in subreader.c to fail (it returns SUB_INVALID). It seems that function only checks the first 100 lines of the file.

Change History (0)

Note: See TracTickets for help on using tickets.