[MPlayer-dev-eng] PATCH: signal handling in gmplayer, immediate mode in tvi_v4l, wrong warning for tv:// MRLs

Sergey Pinaev dfo at antex.ru
Tue May 20 12:17:39 CEST 2003

On Tue, 20 May 2003 11:50:32 +0200
Arpi <arpi at thot.banki.hu> wrote:

A> shit means sigsegv or sigill or sigfpu and such things inside of codecs
A> (even in .dll or external libs) or other modules. there is no way to
A> recover from such error with just setting a variable.

now i got it =)

A> the options are:
A> - clean exit from sighandler (a bit ugly), this is done now
A> (not thread safe, but who cares, mplayer is not multithreaded)
A> - do nothing (let the OS kill the app, without clean exit)
A> - longjmp() hack, to jump out from a sighandler (risky, hardly
A> portable)

"good" way should be to set signal handler with sigaction() and
set sa_mask to block all signals during handler excution and
replace mp_msg's in exit_sighandler with printf("we are dead\n").
exit_player() should also be replaced with exit()...

>> btw, in mencoder you forgot to declare volatile "at_eof" and
>> "interrupted".

A> why should i do so?

   * If your handler needs to access any global variables from your
     program, declare those variables `volatile'.  This tells the
     compiler that the value of the variable might change
     asynchronously, and inhibits certain optimizations that would be
     invalidated by such modifications.

mail="Sergey Pinaev <dfo at antex.ru>"
url="http://`echo $mail | sed 's/.* <\(.*\)>/\1/' | sed 's/@/./'`"

More information about the MPlayer-dev-eng mailing list