Skip to content
This repository has been archived by the owner on Feb 9, 2018. It is now read-only.

Commit

Permalink
Fixed bug that caused embedded subtitles to be displayed instead of e…
Browse files Browse the repository at this point in the history
…xternal
  • Loading branch information
ikarsokolov committed Apr 25, 2013
1 parent bffab74 commit d0c36c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog:
1.82.0 - 2013-??-??

Engines:
MEncoder:
- Fixed bug that caused embedded subtitles to be displayed instead of external
tsMuxeR:
- Fixed 24-bit FLAC support with tsMuxeR

Expand Down
11 changes: 9 additions & 2 deletions src/main/java/net/pms/encoders/MEncoderVideo.java
Original file line number Diff line number Diff line change
Expand Up @@ -1502,19 +1502,26 @@ public ProcessWrapper launchTranscode(
* subs" options if any of the internal conditions for disabling subtitles are met.
*/
if (isDisableSubtitles(params)) {
// Ensure that internal subtitles are not automatically loaded
// MKV: in some circumstances, MEncoder automatically selects an internal sub unless we explicitly disable (internal) subtitles
// http://www.ps3mediaserver.org/forum/viewtopic.php?f=14&t=15891
cmdList.add("-nosub");
// make sure external subs are not automatically loaded
// Ensure that external subtitles are not automatically loaded
cmdList.add("-noautosub");
} else {
// note: isEmbedded() and isExternal() are mutually exclusive
if (params.sid.isEmbedded()) { // internal (embedded) subs
// Ensure that external subtitles are not automatically loaded
cmdList.add("-noautosub");
// Specify which internal subtitle we want
cmdList.add("-sid");
cmdList.add("" + params.sid.getId());
} else { // external subtitles
} else if (externalSubtitlesFileName != null) { // external subtitles
assert params.sid.isExternal(); // confirm the mutual exclusion

// Ensure that internal subtitles are not automatically loaded
cmdList.add("-nosub");

if (params.sid.getType() == SubtitleType.VOBSUB) {
cmdList.add("-vobsub");
cmdList.add(externalSubtitlesFileName.substring(0, externalSubtitlesFileName.length() - 4));
Expand Down

0 comments on commit d0c36c1

Please sign in to comment.