瀏覽代碼

Reset to the orignal format between each track, to prefer the master default even after a forced switch (due to DTS audio or PGS subtitles)

Zachary Kotlarek 14 年之前
父節點
當前提交
21ace86dc6
共有 1 個文件被更改,包括 6 次插入 和 0 次删除
  1. 6 0
      encode.pl

+ 6 - 0
encode.pl

@@ -108,12 +108,18 @@ if (!defined($out_file) || length($out_file) < 1) {
 	}
 }
 
+# Keep the original format around so we can reset between tracks
+my $FORMAT_ORIG = $FORMAT;
+
 # Encode each title
 foreach my $title (keys(%titles)) {
 	if ($DEBUG) {
 		print STDERR 'Setting options for title: ' . $title . "\n";
 	}
 
+	# Reset
+	$FORMAT = $FORMAT_ORIG;
+
 	# Parse the title's audio and subtitle tracks
 	my $scan  = $titles{$title};
 	my @audio = &audioOptions($scan);