fix output
authoryu.dongliang <18588496441@163.com>
Tue, 11 Apr 2023 14:23:18 +0000 (22:23 +0800)
committeryu.dongliang <18588496441@163.com>
Tue, 11 Apr 2023 14:23:25 +0000 (22:23 +0800)
simp_ffmpeg_output.c
simp_filter.c

index db36f5c6eef1ccc8cec337d448ee69e1b74f7cb6..de3004d4b73ec93c7c0ca721a9e00b59f80b2830 100644 (file)
@@ -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;
        }
 
 
index da8c69e9e6812e51812b25d33bfb51c081da98cb..826e3d60861f6d39719478a7c74220864a022bc9 100644 (file)
@@ -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);