This chunk (and the one below it) might be safer if it was:

dlnaspec = "DLNA.ORG_PN=AVC_TS_HD_24_AC3_ISO";
if (mediaRenderer.isTranscodeToH264TSAAC()) {
	dlnaspec = "DLNA.ORG_PN=AVC_TS_HP_HD_AAC";
}