[rtmpdump] r455 - trunk/librtmp/parseurl.c

hyc subversion at mplayerhq.hu
Fri Apr 30 01:33:34 CEST 2010


Author: hyc
Date: Fri Apr 30 01:33:33 2010
New Revision: 455

Log:
Don't strip suffix if prefix was already present

Modified:
   trunk/librtmp/parseurl.c

Modified: trunk/librtmp/parseurl.c
==============================================================================
--- trunk/librtmp/parseurl.c	Thu Apr 29 20:31:05 2010	(r454)
+++ trunk/librtmp/parseurl.c	Fri Apr 30 01:33:33 2010	(r455)
@@ -241,12 +241,20 @@ void RTMP_ParsePlaypath(AVal *in, AVal *
 		return;
 
 	destptr = streamname;
-	if (addMP4 && (strncmp(ppstart, "mp4:", 4) != 0)) {
-		strcpy(destptr, "mp4:");
-		destptr += 4;
-	} else if (addMP3 && (strncmp(ppstart, "mp3:", 4) != 0)) {
-		strcpy(destptr, "mp3:");
-		destptr += 4;
+	if (addMP4) {
+		if (strncmp(ppstart, "mp4:", 4)) {
+			strcpy(destptr, "mp4:");
+			destptr += 4;
+		} else {
+			subExt = 0;
+		}
+	} else if (addMP3) {
+		if (strncmp(ppstart, "mp3:", 4)) {
+			strcpy(destptr, "mp3:");
+			destptr += 4;
+		} else {
+			subExt = 0;
+		}
 	}
 
  	for (p=(char *)ppstart; pplen >0;) {


More information about the rtmpdump mailing list