diff --git a/examples/fplay.nim b/examples/fplay.nim index d9df15a..4917d0e 100644 --- a/examples/fplay.nim +++ b/examples/fplay.nim @@ -52,7 +52,7 @@ proc paramAndCodec(ctx: ptr AVFormatContext, vidcodec, audcodec: var CodecInfo): streams = cast[ptr UncheckedArray[ptr AVStream]](ctx[].streams) foundVideo = false foundAudio = false - for i in 0 .. ctx[].nb_streams: + for i in 0 ..< ctx[].nb_streams: let localparam = streams[i][].codecpar if localparam[].codec_type == AVMEDIA_TYPE_VIDEO: let rational = streams[i].avg_frame_rate @@ -264,4 +264,4 @@ proc sample(ctx: ptr AVCodecContext, pkt: ptr AVPacket, frame: ptr AVFrame; echo &"cannot queue audio: {getError()}" return -main() \ No newline at end of file +main()