[Mt-daapd-cvs] SF.net SVN: mt-daapd: [1395] trunk/src/scan-wma.c
Status: Beta
Brought to you by:
andrew40
From: <rp...@us...> - 2006-10-15 23:07:18
|
Revision: 1395 http://svn.sourceforge.net/mt-daapd/?rev=1395&view=rev Author: rpedde Date: 2006-10-15 16:07:16 -0700 (Sun, 15 Oct 2006) Log Message: ----------- Make DRM-protected wma files have a codectype of WMAP Modified Paths: -------------- trunk/src/scan-wma.c Modified: trunk/src/scan-wma.c =================================================================== --- trunk/src/scan-wma.c 2006-10-15 05:00:20 UTC (rev 1394) +++ trunk/src/scan-wma.c 2006-10-15 23:07:16 UTC (rev 1395) @@ -959,6 +959,7 @@ int item; int err; int res=TRUE; + int encrypted = 0; wma_fd = r_open2(filename,O_RDONLY); if(wma_fd == -1) { @@ -1027,6 +1028,8 @@ res &= wma_parse_stream_properties(wma_fd,(int)subhdr.size,pmp3); } else if(strcmp(pguid->name,"ASF_Header_Extension_Object")==0) { res &= wma_parse_header_extension(wma_fd,(int)subhdr.size,pmp3); + } else if(strstr(pguid->name,"Content_Encryption_Object")) { + encrypted=1; } } else { DPRINTF(E_DBG,L_SCAN,"Unknown subheader: %02hhx%02hhx%02hhx%02hhx-" @@ -1055,5 +1058,13 @@ r_close(wma_fd); + + if(encrypted) { + if(pmp3->codectype) + free(pmp3->codectype); + + pmp3->codectype=strdup("wmap"); + } + return res; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |