فهرست منبع

Fix subtitle sorting

Zach Isbach 3 سال پیش
والد
کامیت
7420bd04a1
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      encode.pl

+ 2 - 2
encode.pl

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