[MPlayer-dev-eng] [PATCH] Segfault in network.c:757

Valentine Zaretsky valik+mplayerdev at email.dp.ua
Fri Feb 27 11:02:02 CET 2004


Hi, Daniel!

I have already proposed fix for this problem (it is a bug in my earlier 
patch):
http://mplayerhq.hu/pipermail/mplayer-dev-eng/2004-February/024290.html

But this patch is not apporved yet.

-- 
Best regards, Valentine



Daniel Serpell wrote:

>Hi!
>
>Trying:
>  mplayer http://171.64.115.101/courses/ee380/040107-ee380-100.wmv
>
>Mplayer crashes with a segfault. Problem is in network.c, line 757
>(current CVS).
>
>Attached is my proposed patch.
>
>Thanks,
>
>    Daniel.
>
>  
>
>------------------------------------------------------------------------
>
>Index: libmpdemux/network.c
>===================================================================
>RCS file: /cvsroot/mplayer/main/libmpdemux/network.c,v
>retrieving revision 1.90
>diff -u -r1.90 network.c
>--- libmpdemux/network.c	17 Feb 2004 12:30:44 -0000	1.90
>+++ libmpdemux/network.c	26 Feb 2004 14:41:56 -0000
>@@ -754,7 +754,14 @@
> 			streaming_ctrl->data = (void*)http_hdr;
> 
> 			// Check if we can make partial content requests and thus seek in http-streams
>-		        seekable=(http_hdr!=NULL && http_hdr->status_code==200 && strncmp(http_get_field(http_hdr,"Accept-Ranges"),"bytes",5)==0);
>+			seekable = 0;
>+			if( http_hdr!=NULL && http_hdr->status_code==200 )
>+			{
>+				char *field;
>+				field = http_get_field(http_hdr,"Accept-Ranges");
>+				if( field )
>+				    seekable = strncmp(field,"bytes",5)==0;
>+			}
> 
> 			// Check if the response is an ICY status_code reason_phrase
> 			if( !strcasecmp(http_hdr->protocol, "ICY") ) {
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>MPlayer-dev-eng mailing list
>MPlayer-dev-eng at mplayerhq.hu
>http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>  
>




More information about the MPlayer-dev-eng mailing list