Opened 11 years ago

Last modified 9 years ago

#1186 closed defect (fixed)

[PATCH] mplayer -novideo crash on files with subtitles

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

Description

Mplayer crashes when the -novideo argument is passed on a file that has a subtitle stream.

Example:
mplayer -novideo somefile.mkv
mplayer -ao pcm -novideo -vo null -ao pcm:file="out.wav" -vc null -ao pcm:fast somefile.mkv

mplayer output:
MPlayer dev-SVN-r27282-4.1.2 (C) 2000-2008 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 44, Stepping: 2)
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

Playing somefile.mkv.
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC) "somefile", -vid 0
[mkv] Track ID 2: audio (A_VORBIS) "2CH Vorbis Audio", -aid 0, -alang jpn
[mkv] Track ID 3: subtitles (S_TEXT/ASS) "ASSA Subtitle", -sid 0, -slang eng
[mkv] No video track found/wanted.
Matroska file format detected.

MPlayer interrupted by signal 11 in module: demux_open2

  • MPlayer crashed by bad usage of CPU/FPU/RAM. Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
  • MPlayer crashed. This shouldn't happen. It can be a bug in the MPlayer code _or_ in your drivers _or_ in your gcc version. If you think it's MPlayer's fault, please read DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and won't help unless you provide this information when reporting a possible bug.

gdb output:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209035072 (LWP 27410)]
update_subtitles (sh_video=0x0, d_dvdsub=0x8df2298, reset=1) at mpcommon.c:105
105 double curpts = sh_video->pts + sub_delay;
(gdb) bt
#0 update_subtitles (sh_video=0x0, d_dvdsub=0x8df2298, reset=1) at mpcommon.c:105
#1 0x08088323 in mp_property_sub (prop=0x858ca40, action=4, arg=0x0, mpctx=0x872e1e0) at command.c:1491
#2 0x080853ac in do_action (prop_list=0x858c380, name=0x8619d57 "sub", action=4, arg=0x0, ctx=0x872e1e0) at m_property.c:40
#3 0x08085491 in m_property_do (prop_list=0x858c380, name=0x8619d57 "sub", action=3, arg=0x0, ctx=0x872e1e0)

at m_property.c:97

#4 0x0808a75e in mp_property_do (name=0x8619d57 "sub", action=4, val=0x0, ctx=0x872e1e0) at command.c:2114
#5 0x08083214 in main (argc=13, argv=0xbfe3b0a4) at mplayer.c:3495

Fix:
--- command.c-old 2008-07-15 05:18:31.000000000 +0200
+++ command.c 2008-07-15 05:21:40.000000000 +0200
@@ -1305,7 +1305,7 @@

int source = -1, reset_spu = 0;
char *sub_name;


  • if (global_sub_size <= 0)
+ if (!mpctx->sh_video
global_sub_size <= 0)

return M_PROPERTY_UNAVAILABLE;


switch (action) {

Change History (2)

comment:1 Changed 11 years ago by compn

  • op_sys changed from Linux to All
  • rep_platform changed from PC (AMD64) to All
  • Summary changed from mplayer -novideo crash on files with subtitles to [PATCH] mplayer -novideo crash on files with subtitles

is it better with mplayer -vc null -vo null instead of -novideo ?
i ask because -novideo is kind of buggy.

reproduced on win32. patch untested.

comment:2 Changed 9 years ago by compn

  • Resolution set to fixed
  • Status changed from new to closed, patriotact@gmail.com

seems fixed in svn

Note: See TracTickets for help on using tickets.