2023-10-19 14:31:46 CST W42D4

This commit is contained in:
aggresss
2023-10-19 14:31:46 +08:00
parent 762aa14362
commit 0f95831c39
52 changed files with 9140 additions and 4324 deletions

View File

@@ -9,7 +9,7 @@ import (
ffmpeg "github.com/qrtc/ffmpeg-dev-go"
)
func encode(encCtx *ffmpeg.AvCodecContext, frame *ffmpeg.AvFrame, pkt *ffmpeg.AvPacket, outfile *os.File) {
func encode(encCtx *ffmpeg.AVCodecContext, frame *ffmpeg.AVFrame, pkt *ffmpeg.AVPacket, outfile *os.File) {
if frame != nil {
fmt.Fprintf(os.Stdout, "Send frame %3d\n", frame.GetPts())
}
@@ -22,7 +22,7 @@ func encode(encCtx *ffmpeg.AvCodecContext, frame *ffmpeg.AvFrame, pkt *ffmpeg.Av
for ret >= 0 {
ret = ffmpeg.AvCodecReceivePacket(encCtx, pkt)
if ret == ffmpeg.AVERROR(int32(syscall.EAGAIN)) || ret == ffmpeg.AVERROR_EOF {
if ret == ffmpeg.AVERROR(syscall.EAGAIN) || ret == ffmpeg.AVERROR_EOF {
return
} else if ret < 0 {
fmt.Fprintf(os.Stderr, "Error during encoding\n")