Latest SVN mplayer unable to play Apple's keynote speech

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



On Tue, Jun 15, 2010 at 07:59:31PM +0000, Carl Eugen Hoyos wrote:
> Tom D. <dtom77 <at> gmail.com> writes:
>
> > I still get the error.
>
> Which error?
>
>>Reimar D?ffinger wrote:
>>The SIGPIPE at the end of the stream.
>>I think this should maybe be fixed in the live555 library (and maybe even
>>is in a newer version), though it maybe would also be better to make
>>MPlayer ignore SIGPIPE.
>>You could try this:
>>Index: mplayer.c
>>===================================================================
>>--- mplayer.c   (revision 31425)
>>+++ mplayer.c   (working copy)
>>@@ -3030,7 +3030,7 @@
>>   signal(SIGINT,exit_sighandler);  // Interrupt from keyboard
>>
>>   signal(SIGQUIT,exit_sighandler); // Quit from keyboard
>>-  signal(SIGPIPE,exit_sighandler); // Some window managers cause this
>>+  signal(SIGPIPE,SIG_IGN); // Some window managers cause this
>> #ifdef CONFIG_SIGHANDLER
>>   // fatal errors:
>>   signal(SIGBUS,exit_sighandler);  // bus error



I applied the patch. Now mplayer just doesn't quit when I want to exit
mplayer. mplayer app just hangs. I've to press cntl+c from keyboard
twice. I'm not expert but can you kindly look at the exit_sighandler()
function whether SIGPIPE being properly handled or not. Now the
function looks like:

static void exit_sighandler(int x){
  static int sig_count=0;
#ifdef CONFIG_CRASH_DEBUG
  if (!crash_debug || x != SIGTRAP)
#endif
  ++sig_count;
  if(initialized_flags==0 && sig_count>1) exit(1);
  if(sig_count==5)
    {
      /* We're crashing bad and can't uninit cleanly :(
       * by popular request, we make one last (dirty)
       * effort to restore the user's
       * terminal. */
      getch2_disable();
      exit(1);
    }
  if(sig_count==6) exit(1);
  if(sig_count>6){
    // can't stop :(
#ifndef __MINGW32__
    kill(getpid(),SIGKILL);
#endif
  }
  mp_msg(MSGT_CPLAYER,MSGL_FATAL,"\n" MSGTR_IntBySignal,x,
      current_module?current_module:"unknown"
  );
  mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SIGNAL=%d\n", x);
  if(sig_count<=1)
  switch(x){
  case SIGINT:
  case SIGQUIT:
  case SIGTERM:
  case SIGKILL:
      async_quit_request = 1;
      return;  // killed from keyboard (^C) or killed [-9]
  case SIGILL:
#if CONFIG_RUNTIME_CPUDETECT
      mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL_RTCpuSel);
#else
      mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL);
#endif
  case SIGFPE:
  case SIGSEGV:
      mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGSEGV_SIGFPE);
  default:
      mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGCRASH);
#ifdef CONFIG_CRASH_DEBUG
      if (crash_debug) {
        int gdb_pid;
        mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forking...\n");
        gdb_pid = fork();
        mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forked...\n");
        if (gdb_pid == 0) { // We are the child
          char spid[20];
          snprintf(spid, sizeof(spid), "%i", getppid());
          getch2_disable(); // allow terminal to work properly with gdb
          if (execlp("gdb", "gdb", prog_path, spid, "-ex", "bt", NULL) == -1)
            mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't start gdb\n");
        } else if (gdb_pid < 0)
          mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't fork\n");
        else {
          waitpid(gdb_pid, NULL, 0);
        }
        if (x == SIGTRAP) return;
      }
#endif
  }
  getch2_disable();
  exit(1);
}


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux