Skip to content

Commit 78904ca

Browse files
committed
Fixed compatibility with png streams
1 parent dbb584d commit 78904ca

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ffmpeg.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bufio"
55
"fmt"
66
"io"
7+
"slices"
78
"strconv"
89
"strings"
910

@@ -113,7 +114,7 @@ func buildUpscalingParams(anime Anime, resolution Resolution, shader Shader, out
113114
)
114115

115116
for _, stream := range anime.Streams {
116-
if stream.CodecName != "mjpeg" {
117+
if !slices.Contains(codecsBlacklist, stream.CodecName) {
117118
params = append(params, "-map", fmt.Sprintf("0:%d", stream.Index))
118119
}
119120
}

main.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ var (
8282
"Drag n' drop your video files into this window (supported extensions: mp4, avi, mkv)\n\n"
8383

8484
// Internals
85-
animeList = make([]Anime, 0)
86-
processing = false
87-
cancelled = false
85+
animeList = make([]Anime, 0)
86+
processing = false
87+
cancelled = false
88+
codecsBlacklist = []string{"mjpeg", "png"}
8889

8990
// FFMPEG params
9091
hwaccelParams []string

0 commit comments

Comments
 (0)