Explorar o código

Fix subtitle sorting

Zach Isbach %!s(int64=3) %!d(string=hai) anos
pai
achega
7420bd04a1
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      encode.pl

+ 2 - 2
encode.pl

@@ -379,8 +379,7 @@ foreach my $title (keys(%titles)) {
 
 	# Include subtitles if available
 	if (scalar(@subs)) {
-		# Sorted, to keep the original order
-		push(@args, sort(@subs));
+		push(@args, @subs);
 	}
 
 	# Include audio unless specifically excluded
@@ -494,6 +493,7 @@ sub subOptions($) {
 	if (scalar(@keep) < 1) {
 		return '';
 	}
+	@keep = sort { $a <=> $b } @keep;
 	return ('--subtitle', join(',', @keep));
 }