changeset 29571:94524110f645

Make the loop detection for mov reference files less aggressive, fixes playback of http://stream.qtv.apple.com/qtv/wgbh/http/nova_eu/nova_eu_3012c01_mp4_ref.mov
author reimar
date Tue, 01 Sep 2009 15:52:13 +0000
parents eb2567b65311
children 4890363e713a
files mplayer.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Tue Sep 01 15:20:05 2009 +0000
+++ b/mplayer.c	Tue Sep 01 15:52:13 2009 +0000
@@ -3219,7 +3219,7 @@
     if ((strlen(bname)>10) && !strncmp(bname,"qt",2) && !strncmp(bname+3,"gateQT",6))
         continue;
 
-    if (!strncmp(bname,mp_basename(filename),strlen(bname))) // ignoring self-reference
+    if (!strcmp(playlist_entry,filename)) // ignoring self-reference
         continue;
 
     entry = play_tree_new();
@@ -3231,6 +3231,10 @@
       {
 	strncpy(temp, filename, strlen(filename)-strlen(mp_basename(filename)));
 	temp[strlen(filename)-strlen(mp_basename(filename))]='\0';
+	if (!strcmp(temp, filename)) {
+	  free(temp);
+	  continue;
+	}
 	strcat(temp, playlist_entry);
 	play_tree_add_file(entry,temp);
 	mp_msg(MSGT_CPLAYER,MSGL_V,"Resolving reference to %s.\n",temp);