changeset 12571:eba4d274e0a0

Fix playback of file after playing an url Patch by Aurelien Jacobs <aurel (at) gnuage (dot) org>
author rtognimp
date Fri, 11 Jun 2004 20:57:03 +0000
parents 148f3c98a041
children 7d681d8ebab8
files libmpdemux/open.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/open.c	Fri Jun 11 15:20:49 2004 +0000
+++ b/libmpdemux/open.c	Fri Jun 11 20:57:03 2004 +0000
@@ -517,6 +517,7 @@
 //	    if (len == -1)	
 //    		   return new_stream(f,STREAMTYPE_STREAM); // open as stream
 	    url_free(url);
+	    url = NULL;
             stream=new_stream(f,STREAMTYPE_SMB);
     	    stream->end_pos=len;
 	    return stream;
@@ -530,10 +531,12 @@
 	if( streaming_start( stream, file_format, url )<0){
           mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_UnableOpenURL, filename);
 	  url_free(url);
+	  url = NULL;
 	  return NULL;
 	} else {
         mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ConnToServer, url->hostname );
 	url_free(url);
+	url = NULL;
 	return stream;
 	}
   }