[Live-devel] Kasenna auto-detect patch

Ross Finlayson finlayson at live.com
Fri Nov 12 15:30:50 PST 2004


At 02:02 PM 11/12/04, you wrote:
>and could you extend this part:
>
>+    if (kasennaServer && (strncmp(kasennaContentType, "MPEG-2", 6) == 0) ||
>+                         (strncmp(kasennaContentType, "MPEG-1", 6) == 0))
>
>to also add the type MPEG1-Audio  (exactly this case and - breaking. i 
>double checked).
>This is for MP3 streams (not yet working).

Note that the *actual* code - currently in "liveMedia/RTSPClient.cpp" - is:
         if (fServerIsKasenna && fKasennaContentType != NULL &&
                 (strncmp(fKasennaContentType, "MPEG-2", 6) == 0 ||
                         strncmp(fKasennaContentType, "MPEG-1", 6) == 0)) {

Note the parentheses.  The original patch had this wrong, because && binds 
tighter than ||.  The current test should succeed if
         1/ "fServerIsKasenna" is True, AND
         2/ The first 6 bytes of "fKasennaContentType" are "MPEG-2" or 
"MPEG-1".

If this is wrong, please send a new patch against the *current* code.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list