Program: 47103
Project: 47103
Buggy source:
/** 
 * Creates the DLNA.ORG_PN to send. DLNA.ORG_PN is a string that tells the renderer what type of file to expect, like its container, framerate, codecs and resolution. Some renderers will not play a file if it has the wrong DLNA.ORG_PN string, while others are fine with any string or even nothing.
 * @param mediaRenderer Media Renderer for which to represent this information.
 * @param localizationValue
 * @return String representation of the DLNA.ORG_PN flags
 */
private String getDlnaOrgPnFlags(RendererConfiguration mediaRenderer,int localizationValue){
  PmsConfiguration configuration=PMS.getConfiguration(mediaRenderer);
  String mime=getRendererMimeType(mediaRenderer);
  String dlnaOrgPnFlags=null;
  if (mediaRenderer.isDLNAOrgPNUsed() || mediaRenderer.isAccurateDLNAOrgPN()) {
    if (mediaRenderer.isPS3()) {
      if (mime.equals(DIVX_TYPEMIME)) {
        dlnaOrgPnFlags="String_Node_Str";
      }
 else       if (mime.equals(WMV_TYPEMIME) && media != null && media.getHeight() > 700) {
        dlnaOrgPnFlags="String_Node_Str";
      }
    }
 else {
      if (mime.equals(MPEG_TYPEMIME)) {
        dlnaOrgPnFlags="String_Node_Str" + getMPEG_PS_PALLocalizedValue(localizationValue);
        if (player != null) {
          boolean isFileMPEGTS=TsMuxeRVideo.ID.equals(player.id()) || VideoLanVideoStreaming.ID.equals(player.id());
          if (!isFileMPEGTS && mediaRenderer.isTranscodeToMPEGTS() && (MEncoderVideo.ID.equals(player.id()) || FFMpegVideo.ID.equals(player.id()) || VLCVideo.ID.equals(player.id())|| AviSynthFFmpeg.ID.equals(player.id())|| AviSynthMEncoder.ID.equals(player.id()))) {
            isFileMPEGTS=true;
          }
          boolean isMuxableResult=getMedia() != null && getMedia().isMuxable(mediaRenderer);
          if (!isFileMPEGTS && ((configuration.isMencoderMuxWhenCompatible() && MEncoderVideo.ID.equals(player.id())) || (configuration.isFFmpegMuxWithTsMuxerWhenCompatible() && FFMpegVideo.ID.equals(player.id())))) {
            if (mediaRenderer.isAccurateDLNAOrgPN()) {
              boolean finishedMatchingPreferences=false;
              OutputParams params=new OutputParams(configuration);
              if (params.aid == null && media != null && media.getFirstAudioTrack() != null) {
                DLNAMediaAudio dtsTrack=null;
                StringTokenizer st=new StringTokenizer(configuration.getAudioLanguages(),"String_Node_Str");
                while (st.hasMoreTokens()) {
                  String lang=st.nextToken().trim();
                  LOGGER.trace("String_Node_Str" + lang);
                  for (                  DLNAMediaAudio audio : media.getAudioTracksList()) {
                    if (audio.matchCode(lang)) {
                      params.aid=audio;
                      LOGGER.trace("String_Node_Str" + audio);
                      break;
                    }
                    if (dtsTrack == null && audio.isDTS()) {
                      dtsTrack=audio;
                    }
                  }
                }
                if (dtsTrack != null) {
                  params.aid=dtsTrack;
                  LOGGER.trace("String_Node_Str" + dtsTrack);
                }
 else {
                  params.aid=media.getAudioTracksList().get(0);
                  LOGGER.trace("String_Node_Str" + params.aid);
                }
              }
              String currentLang=null;
              DLNAMediaSubtitle matchedSub=null;
              if (params.aid != null) {
                currentLang=params.aid.getLang();
              }
              if (params.sid != null && params.sid.getId() == -1) {
                LOGGER.trace("String_Node_Str");
                params.sid=null;
                media_subtitle=params.sid;
                finishedMatchingPreferences=true;
              }
              if (!finishedMatchingPreferences && params.sid != null && !StringUtils.isEmpty(params.sid.getLiveSubURL())) {
                LOGGER.debug("String_Node_Str" + params.sid.getLiveSubURL());
                try {
                  matchedSub=params.sid;
                  String file=OpenSubtitle.fetchSubs(matchedSub.getLiveSubURL(),matchedSub.getLiveSubFile());
                  if (!StringUtils.isEmpty(file)) {
                    matchedSub.setExternalFile(new File(file));
                    params.sid=matchedSub;
                    media_subtitle=params.sid;
                    finishedMatchingPreferences=true;
                  }
                }
 catch (                IOException e) {
                }
              }
              if (!finishedMatchingPreferences) {
                StringTokenizer st=new StringTokenizer(configuration.getAudioSubLanguages(),"String_Node_Str");
                boolean matchedInternalSubtitles=false;
                boolean matchedExternalSubtitles=false;
                while (st.hasMoreTokens()) {
                  String pair=st.nextToken();
                  if (pair.contains("String_Node_Str")) {
                    String audio=pair.substring(0,pair.indexOf(','));
                    String sub=pair.substring(pair.indexOf(',') + 1);
                    audio=audio.trim();
                    sub=sub.trim();
                    LOGGER.trace("String_Node_Str" + currentLang + "String_Node_Str"+ audio+ "String_Node_Str"+ sub);
                    if (Iso639.isCodesMatching(audio,currentLang) || (currentLang != null && audio.equals("String_Node_Str"))) {
                      if (sub.equals("String_Node_Str")) {
                        if (configuration.isForceExternalSubtitles()) {
                          for (                          DLNAMediaSubtitle present_sub : media.getSubtitleTracksList()) {
                            if (present_sub.getExternalFile() != null) {
                              matchedSub=present_sub;
                              matchedExternalSubtitles=true;
                              LOGGER.trace("String_Node_Str");
                              break;
                            }
                          }
                        }
                        if (!matchedExternalSubtitles) {
                          matchedSub=new DLNAMediaSubtitle();
                          matchedSub.setLang("String_Node_Str");
                        }
                      }
 else                       if (getMedia() != null) {
                        for (                        DLNAMediaSubtitle present_sub : media.getSubtitleTracksList()) {
                          if (present_sub.matchCode(sub) || sub.equals("String_Node_Str")) {
                            if (present_sub.getExternalFile() != null) {
                              if (configuration.isAutoloadExternalSubtitles()) {
                                matchedSub=present_sub;
                                LOGGER.trace("String_Node_Str" + matchedSub);
                                break;
                              }
 else {
                                LOGGER.trace("String_Node_Str" + present_sub);
                              }
                            }
 else                             if (!matchedInternalSubtitles) {
                              matchedSub=present_sub;
                              LOGGER.trace("String_Node_Str" + matchedSub);
                              if (configuration.isAutoloadExternalSubtitles()) {
                                matchedInternalSubtitles=true;
                              }
 else {
                                break;
                              }
                            }
                          }
                        }
                      }
                      if (matchedSub != null && !matchedInternalSubtitles) {
                        break;
                      }
                    }
                  }
                }
                if (matchedSub == null && configuration.isForceExternalSubtitles()) {
                  for (                  DLNAMediaSubtitle present_sub : media.getSubtitleTracksList()) {
                    if (present_sub.getExternalFile() != null) {
                      matchedSub=present_sub;
                      LOGGER.trace("String_Node_Str" + matchedSub);
                      break;
                    }
                  }
                }
                if (matchedSub != null && params.sid == null) {
                  if (configuration.isDisableSubtitles() || (matchedSub.getLang() != null && matchedSub.getLang().equals("String_Node_Str"))) {
                    LOGGER.trace("String_Node_Str" + matchedSub);
                  }
 else {
                    params.sid=matchedSub;
                    media_subtitle=params.sid;
                  }
                }
                if (!configuration.isDisableSubtitles() && params.sid == null && media != null) {
                  File video=new File(getSystemName());
                  FileUtil.isSubtitlesExists(video,media,false);
                  if (configuration.isAutoloadExternalSubtitles()) {
                    boolean forcedSubsFound=false;
                    for (                    DLNAMediaSubtitle sub : media.getSubtitleTracksList()) {
                      if (matchedSub != null && matchedSub.getLang() != null && matchedSub.getLang().equals("String_Node_Str")) {
                        st=new StringTokenizer(configuration.getForcedSubtitleTags(),"String_Node_Str");
                        while (sub.getSubtitlesTrackTitleFromMetadata() != null && st.hasMoreTokens()) {
                          String forcedTags=st.nextToken();
                          forcedTags=forcedTags.trim();
                          if (sub.getSubtitlesTrackTitleFromMetadata().toLowerCase().contains(forcedTags) && Iso639.isCodesMatching(sub.getLang(),configuration.getForcedSubtitleLanguage())) {
                            LOGGER.trace("String_Node_Str" + sub.getLang() + "String_Node_Str"+ sub.getSubtitlesTrackTitleFromMetadata());
                            LOGGER.trace("String_Node_Str" + sub);
                            if (sub.getExternalFile() != null) {
                              LOGGER.trace("String_Node_Str" + sub.getExternalFile().getAbsolutePath());
                            }
                            params.sid=sub;
                            media_subtitle=params.sid;
                            forcedSubsFound=true;
                            break;
                          }
                        }
                        if (forcedSubsFound == true) {
                          break;
                        }
                      }
 else {
                        LOGGER.trace("String_Node_Str" + sub);
                        if (sub.getExternalFile() != null) {
                          LOGGER.trace("String_Node_Str" + sub.getExternalFile().getAbsolutePath());
                          params.sid=sub;
                          media_subtitle=params.sid;
                          break;
                        }
                      }
                    }
                  }
                  if (matchedSub != null && matchedSub.getLang() != null && matchedSub.getLang().equals("String_Node_Str")) {
                    finishedMatchingPreferences=true;
                  }
                  if (!finishedMatchingPreferences && params.sid == null) {
                    st=new StringTokenizer(UMSUtils.getLangList(params.mediaRenderer),"String_Node_Str");
                    while (st.hasMoreTokens()) {
                      String lang=st.nextToken();
                      lang=lang.trim();
                      LOGGER.trace("String_Node_Str" + lang);
                      for (                      DLNAMediaSubtitle sub : media.getSubtitleTracksList()) {
                        if (sub.matchCode(lang) && !(!configuration.isAutoloadExternalSubtitles() && sub.getExternalFile() != null)) {
                          params.sid=sub;
                          LOGGER.trace("String_Node_Str" + params.sid);
                          break;
                        }
                      }
                    }
                  }
                }
              }
              if (media_subtitle == null) {
                LOGGER.trace("String_Node_Str" + getName());
              }
 else {
                LOGGER.trace("String_Node_Str" + getName());
              }
            }
            if (media_subtitle == null && !hasExternalSubtitles() && media != null && media.getDvdtrack() == 0 && isMuxableResult && mediaRenderer.isMuxH264MpegTS()) {
              isFileMPEGTS=true;
            }
          }
          if (isFileMPEGTS) {
            dlnaOrgPnFlags="String_Node_Str" + getMPEG_TS_SD_EU_ISOLocalizedValue(localizationValue);
            if (media.isH264() && !VideoLanVideoStreaming.ID.equals(player.id()) && isMuxableResult) {
              dlnaOrgPnFlags="String_Node_Str";
              if (mediaRenderer.isTranscodeToMPEGTSH264AAC()) {
                dlnaOrgPnFlags="String_Node_Str";
              }
            }
          }
        }
 else         if (media != null) {
          if (media.isMpegTS()) {
            dlnaOrgPnFlags="String_Node_Str" + getMPEG_TS_EULocalizedValue(localizationValue,media.isHDVideo());
            if (media.isH264()) {
              dlnaOrgPnFlags="String_Node_Str";
              if (mediaRenderer.isTranscodeToMPEGTSH264AAC()) {
                dlnaOrgPnFlags="String_Node_Str";
              }
            }
          }
        }
      }
 else       if (mime.equals("String_Node_Str")) {
        dlnaOrgPnFlags="String_Node_Str" + getMPEG_TS_EULocalizedValue(localizationValue,media.isHDVideo());
      }
 else       if (mime.equals(JPEG_TYPEMIME)) {
        dlnaOrgPnFlags="String_Node_Str";
      }
 else       if (mime.equals(AUDIO_MP3_TYPEMIME)) {
        dlnaOrgPnFlags="String_Node_Str";
      }
 else       if (mime.substring(0,9).equals(AUDIO_LPCM_TYPEMIME) || mime.equals(AUDIO_WAV_TYPEMIME)) {
        dlnaOrgPnFlags="String_Node_Str";
      }
    }
    if (dlnaOrgPnFlags != null) {
      dlnaOrgPnFlags="String_Node_Str" + mediaRenderer.getDLNAPN(dlnaOrgPnFlags.substring(12));
    }
  }
  return dlnaOrgPnFlags;
}

Fixed version (ground truth):
/** 
 * Creates the DLNA.ORG_PN to send. DLNA.ORG_PN is a string that tells the renderer what type of file to expect, like its container, framerate, codecs and resolution. Some renderers will not play a file if it has the wrong DLNA.ORG_PN string, while others are fine with any string or even nothing.
 * @param mediaRenderer Media Renderer for which to represent this information.
 * @param localizationValue
 * @return String representation of the DLNA.ORG_PN flags
 */
private String getDlnaOrgPnFlags(RendererConfiguration mediaRenderer,int localizationValue){
  PmsConfiguration configuration=PMS.getConfiguration(mediaRenderer);
  String mime=getRendererMimeType(mediaRenderer);
  String dlnaOrgPnFlags=null;
  if (mediaRenderer.isDLNAOrgPNUsed() || mediaRenderer.isAccurateDLNAOrgPN()) {
    if (mediaRenderer.isPS3()) {
      if (mime.equals(DIVX_TYPEMIME)) {
        dlnaOrgPnFlags="String_Node_Str";
      }
 else       if (mime.equals(WMV_TYPEMIME) && media != null && media.getHeight() > 700) {
        dlnaOrgPnFlags="String_Node_Str";
      }
    }
 else {
      if (mime.equals(MPEG_TYPEMIME)) {
        dlnaOrgPnFlags="String_Node_Str" + getMPEG_PS_PALLocalizedValue(localizationValue);
        if (player != null) {
          boolean isFileMPEGTS=TsMuxeRVideo.ID.equals(player.id()) || VideoLanVideoStreaming.ID.equals(player.id());
          if (!isFileMPEGTS && mediaRenderer.isTranscodeToMPEGTS() && (MEncoderVideo.ID.equals(player.id()) || FFMpegVideo.ID.equals(player.id()) || VLCVideo.ID.equals(player.id())|| AviSynthFFmpeg.ID.equals(player.id())|| AviSynthMEncoder.ID.equals(player.id()))) {
            isFileMPEGTS=true;
          }
          boolean isMuxableResult=getMedia() != null && getMedia().isMuxable(mediaRenderer);
          if (!isFileMPEGTS && ((configuration.isMencoderMuxWhenCompatible() && MEncoderVideo.ID.equals(player.id())) || (configuration.isFFmpegMuxWithTsMuxerWhenCompatible() && FFMpegVideo.ID.equals(player.id())))) {
            if (mediaRenderer.isAccurateDLNAOrgPN()) {
              boolean finishedMatchingPreferences=false;
              OutputParams params=new OutputParams(configuration);
              if (params.aid == null && media != null && media.getFirstAudioTrack() != null) {
                DLNAMediaAudio dtsTrack=null;
                StringTokenizer st=new StringTokenizer(configuration.getAudioLanguages(),"String_Node_Str");
                while (st.hasMoreTokens()) {
                  String lang=st.nextToken().trim();
                  LOGGER.trace("String_Node_Str" + lang);
                  for (                  DLNAMediaAudio audio : media.getAudioTracksList()) {
                    if (audio.matchCode(lang)) {
                      params.aid=audio;
                      LOGGER.trace("String_Node_Str" + audio);
                      break;
                    }
                    if (dtsTrack == null && audio.isDTS()) {
                      dtsTrack=audio;
                    }
                  }
                }
                if (dtsTrack != null) {
                  params.aid=dtsTrack;
                  LOGGER.trace("String_Node_Str" + dtsTrack);
                }
 else {
                  params.aid=media.getAudioTracksList().get(0);
                  LOGGER.trace("String_Node_Str" + params.aid);
                }
              }
              String currentLang=null;
              DLNAMediaSubtitle matchedSub=null;
              if (params.aid != null) {
                currentLang=params.aid.getLang();
              }
              if (params.sid != null && params.sid.getId() == -1) {
                LOGGER.trace("String_Node_Str");
                params.sid=null;
                media_subtitle=params.sid;
                finishedMatchingPreferences=true;
              }
              if (!finishedMatchingPreferences && params.sid != null && !StringUtils.isEmpty(params.sid.getLiveSubURL())) {
                LOGGER.debug("String_Node_Str" + params.sid.getLiveSubURL());
                try {
                  matchedSub=params.sid;
                  String file=OpenSubtitle.fetchSubs(matchedSub.getLiveSubURL(),matchedSub.getLiveSubFile());
                  if (!StringUtils.isEmpty(file)) {
                    matchedSub.setExternalFile(new File(file),null);
                    params.sid=matchedSub;
                    media_subtitle=params.sid;
                    finishedMatchingPreferences=true;
                  }
                }
 catch (                IOException e) {
                }
              }
              if (!finishedMatchingPreferences) {
                StringTokenizer st=new StringTokenizer(configuration.getAudioSubLanguages(),"String_Node_Str");
                boolean matchedInternalSubtitles=false;
                boolean matchedExternalSubtitles=false;
                while (st.hasMoreTokens()) {
                  String pair=st.nextToken();
                  if (pair.contains("String_Node_Str")) {
                    String audio=pair.substring(0,pair.indexOf(','));
                    String sub=pair.substring(pair.indexOf(',') + 1);
                    audio=audio.trim();
                    sub=sub.trim();
                    LOGGER.trace("String_Node_Str" + currentLang + "String_Node_Str"+ audio+ "String_Node_Str"+ sub);
                    if (Iso639.isCodesMatching(audio,currentLang) || (currentLang != null && audio.equals("String_Node_Str"))) {
                      if (sub.equals("String_Node_Str")) {
                        if (configuration.isForceExternalSubtitles()) {
                          for (                          DLNAMediaSubtitle present_sub : media.getSubtitleTracksList()) {
                            if (present_sub.getExternalFile() != null) {
                              matchedSub=present_sub;
                              matchedExternalSubtitles=true;
                              LOGGER.trace("String_Node_Str");
                              break;
                            }
                          }
                        }
                        if (!matchedExternalSubtitles) {
                          matchedSub=new DLNAMediaSubtitle();
                          matchedSub.setLang("String_Node_Str");
                        }
                      }
 else                       if (getMedia() != null) {
                        for (                        DLNAMediaSubtitle present_sub : media.getSubtitleTracksList()) {
                          if (present_sub.matchCode(sub) || sub.equals("String_Node_Str")) {
                            if (present_sub.getExternalFile() != null) {
                              if (configuration.isAutoloadExternalSubtitles()) {
                                matchedSub=present_sub;
                                LOGGER.trace("String_Node_Str" + matchedSub);
                                break;
                              }
 else {
                                LOGGER.trace("String_Node_Str" + present_sub);
                              }
                            }
 else                             if (!matchedInternalSubtitles) {
                              matchedSub=present_sub;
                              LOGGER.trace("String_Node_Str" + matchedSub);
                              if (configuration.isAutoloadExternalSubtitles()) {
                                matchedInternalSubtitles=true;
                              }
 else {
                                break;
                              }
                            }
                          }
                        }
                      }
                      if (matchedSub != null && !matchedInternalSubtitles) {
                        break;
                      }
                    }
                  }
                }
                if (matchedSub == null && configuration.isForceExternalSubtitles()) {
                  for (                  DLNAMediaSubtitle present_sub : media.getSubtitleTracksList()) {
                    if (present_sub.getExternalFile() != null) {
                      matchedSub=present_sub;
                      LOGGER.trace("String_Node_Str" + matchedSub);
                      break;
                    }
                  }
                }
                if (matchedSub != null && params.sid == null) {
                  if (configuration.isDisableSubtitles() || (matchedSub.getLang() != null && matchedSub.getLang().equals("String_Node_Str"))) {
                    LOGGER.trace("String_Node_Str" + matchedSub);
                  }
 else {
                    params.sid=matchedSub;
                    media_subtitle=params.sid;
                  }
                }
                if (!configuration.isDisableSubtitles() && params.sid == null && media != null) {
                  File video=new File(getSystemName());
                  FileUtil.isSubtitlesExists(video,media,false);
                  if (configuration.isAutoloadExternalSubtitles()) {
                    boolean forcedSubsFound=false;
                    for (                    DLNAMediaSubtitle sub : media.getSubtitleTracksList()) {
                      if (matchedSub != null && matchedSub.getLang() != null && matchedSub.getLang().equals("String_Node_Str")) {
                        st=new StringTokenizer(configuration.getForcedSubtitleTags(),"String_Node_Str");
                        while (sub.getSubtitlesTrackTitleFromMetadata() != null && st.hasMoreTokens()) {
                          String forcedTags=st.nextToken();
                          forcedTags=forcedTags.trim();
                          if (sub.getSubtitlesTrackTitleFromMetadata().toLowerCase().contains(forcedTags) && Iso639.isCodesMatching(sub.getLang(),configuration.getForcedSubtitleLanguage())) {
                            LOGGER.trace("String_Node_Str" + sub.getLang() + "String_Node_Str"+ sub.getSubtitlesTrackTitleFromMetadata());
                            LOGGER.trace("String_Node_Str" + sub);
                            if (sub.getExternalFile() != null) {
                              LOGGER.trace("String_Node_Str" + sub.getExternalFile().getAbsolutePath());
                            }
                            params.sid=sub;
                            media_subtitle=params.sid;
                            forcedSubsFound=true;
                            break;
                          }
                        }
                        if (forcedSubsFound == true) {
                          break;
                        }
                      }
 else {
                        LOGGER.trace("String_Node_Str" + sub);
                        if (sub.getExternalFile() != null) {
                          LOGGER.trace("String_Node_Str" + sub.getExternalFile().getAbsolutePath());
                          params.sid=sub;
                          media_subtitle=params.sid;
                          break;
                        }
                      }
                    }
                  }
                  if (matchedSub != null && matchedSub.getLang() != null && matchedSub.getLang().equals("String_Node_Str")) {
                    finishedMatchingPreferences=true;
                  }
                  if (!finishedMatchingPreferences && params.sid == null) {
                    st=new StringTokenizer(UMSUtils.getLangList(params.mediaRenderer),"String_Node_Str");
                    while (st.hasMoreTokens()) {
                      String lang=st.nextToken();
                      lang=lang.trim();
                      LOGGER.trace("String_Node_Str" + lang);
                      for (                      DLNAMediaSubtitle sub : media.getSubtitleTracksList()) {
                        if (sub.matchCode(lang) && !(!configuration.isAutoloadExternalSubtitles() && sub.getExternalFile() != null)) {
                          params.sid=sub;
                          LOGGER.trace("String_Node_Str" + params.sid);
                          break;
                        }
                      }
                    }
                  }
                }
              }
              if (media_subtitle == null) {
                LOGGER.trace("String_Node_Str" + getName());
              }
 else {
                LOGGER.trace("String_Node_Str" + getName());
              }
            }
            if (media_subtitle == null && !hasExternalSubtitles() && media != null && media.getDvdtrack() == 0 && isMuxableResult && mediaRenderer.isMuxH264MpegTS()) {
              isFileMPEGTS=true;
            }
          }
          if (isFileMPEGTS) {
            dlnaOrgPnFlags="String_Node_Str" + getMPEG_TS_SD_EU_ISOLocalizedValue(localizationValue);
            if (media.isH264() && !VideoLanVideoStreaming.ID.equals(player.id()) && isMuxableResult) {
              dlnaOrgPnFlags="String_Node_Str";
              if (mediaRenderer.isTranscodeToMPEGTSH264AAC()) {
                dlnaOrgPnFlags="String_Node_Str";
              }
            }
          }
        }
 else         if (media != null) {
          if (media.isMpegTS()) {
            dlnaOrgPnFlags="String_Node_Str" + getMPEG_TS_EULocalizedValue(localizationValue,media.isHDVideo());
            if (media.isH264()) {
              dlnaOrgPnFlags="String_Node_Str";
              if (mediaRenderer.isTranscodeToMPEGTSH264AAC()) {
                dlnaOrgPnFlags="String_Node_Str";
              }
            }
          }
        }
      }
 else       if (mime.equals("String_Node_Str")) {
        dlnaOrgPnFlags="String_Node_Str" + getMPEG_TS_EULocalizedValue(localizationValue,media.isHDVideo());
      }
 else       if (mime.equals(JPEG_TYPEMIME)) {
        dlnaOrgPnFlags="String_Node_Str";
      }
 else       if (mime.equals(AUDIO_MP3_TYPEMIME)) {
        dlnaOrgPnFlags="String_Node_Str";
      }
 else       if (mime.substring(0,9).equals(AUDIO_LPCM_TYPEMIME) || mime.equals(AUDIO_WAV_TYPEMIME)) {
        dlnaOrgPnFlags="String_Node_Str";
      }
    }
    if (dlnaOrgPnFlags != null) {
      dlnaOrgPnFlags="String_Node_Str" + mediaRenderer.getDLNAPN(dlnaOrgPnFlags.substring(12));
    }
  }
  return dlnaOrgPnFlags;
}