Skip to content

Commit 55ceecb

Browse files
committed
Updated example
1 parent b61c969 commit 55ceecb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/examples/decode/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func main() {
2828
// The audio and video streams are resampled and resized to fit the
2929
// parameters we pass to the decoder.
3030
mapfunc := func(stream int, par *ffmpeg.Par) (*ffmpeg.Par, error) {
31-
if par.Type() == VIDEO {
31+
if stream == input.BestStream(VIDEO) {
3232
// Convert frame to yuv420p as needed
3333
return ffmpeg.VideoPar("yuv420p", par.WidthHeight(), par.FrameRate()), nil
3434
}

0 commit comments

Comments
 (0)