seg fault with svn-r30146

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

 



Hi all,

I'm getting a seg-faulr from a self compiled mplayer from the svn repository r30146.
Here is the command line to reproduce it:


giorgio [ ~ ]$ mplayer -playlist http://www.radioparadise.com/musiclinks/rp_64aac.m3u
Resolving www.radioparadise.com for AF_INET...

Connecting to server www.radioparadise.com[72.26.207.68]: 80...
Cache size set to 320 KBytes
MPlayer SVN-r30146-4.4.2 (C) 2000-2009 MPlayer 
Team

Playing http://207.200.96.231:8004.
Connecting to server 207.200.96.231[207.200.96.231]: 8004...


MPlayer interrupted by signal 11 
in module: open_stream
- 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.


I've tracked the bug down to the file:function:

stream/http.c:http_streaming_start(stream_t *stream, int* 
file_format)

around line 773:

// Check if we can make partial content requests and thus seek in http-streams
if( http_hdr!=NULL && 
http_hdr->status_code==200 ) {
    char *accept_ranges;
    if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL )
	
seekable = strncmp(accept_ranges,"bytes",5)==0;
    else if (strcmp(http_get_field(http_hdr, "Server"), "gvs 1.0") == 0)                 
<== HERE is the problem
	seekable = 1; // HACK for youtube incorrectly claiming not to support seeking
}

the problem is: when the function 
call 'http_get_field(http_hdr, "Server")', that provide
the first argument for the 'strcmp()', returns a NULL the 'strcmp()' simply seg-
faults :-(

I've fixed it with:

// Check if we can make partial content requests and thus seek in http-streams
if( http_hdr!=NULL && 
http_hdr->status_code==200 ) {
    char *accept_ranges;
    if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL )
	
seekable = strncmp(accept_ranges,"bytes",5)==0;
    else {
      char *p=http_get_field(http_hdr, "Server");
      if (p && strcmp(p, "gvs 
1.0") == 0)                   <== FIX: test for p != NULL first
	seekable = 1; // HACK for youtube incorrectly claiming not to support 
seeking
    }
}

giorgio



Rubriche e Agende 2010. Tutte con la copertina personalizzabile con le tue foto.



http://photo.tiscali.it


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