From ce71dae3db89b8ad825203d076f1bf1dade86ece Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Tue, 11 Apr 2023 22:23:18 +0800 Subject: [PATCH] fix output --- simp_ffmpeg_output.c | 4 ++++ simp_filter.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/simp_ffmpeg_output.c b/simp_ffmpeg_output.c index db36f5c..de3004d 100644 --- a/simp_ffmpeg_output.c +++ b/simp_ffmpeg_output.c @@ -154,6 +154,8 @@ static int _ffmpeg_output_open(simp_avio_t* io, const char* path) ret = _video_init(priv); if (ret < 0) goto error; + + io->vopen = 1; } if (priv->fmt_ctx->oformat->audio_codec != AV_CODEC_ID_NONE) { @@ -161,6 +163,8 @@ static int _ffmpeg_output_open(simp_avio_t* io, const char* path) ret = _audio_init(priv); if (ret < 0) goto error; + + io->aopen = 1; } diff --git a/simp_filter.c b/simp_filter.c index da8c69e..826e3d6 100644 --- a/simp_filter.c +++ b/simp_filter.c @@ -291,7 +291,7 @@ static int _filter_add_video(simp_avio_t* io, AVRational speed) int64_t min = sec / 60; sec %= 60; - scf_logi("vf->pts: %ld, vtime: %ld, time: %ld, nb_vframes: %d, %ld:%ld:%ld.%ld\n", + scf_logd("vf->pts: %ld, vtime: %ld, time: %ld, nb_vframes: %d, %ld:%ld:%ld.%ld\n", vf->frame->pts, vtime, time, io->nb_vframes, hour, min, sec, usec); int ret = av_buffersrc_add_frame_flags(io->vbuffersrc_ctx, vf->frame, AV_BUFFERSRC_FLAG_KEEP_REF); -- 2.25.1