From 652fcac0d39c69b9012622ef65011a4d0df50a48 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Sun, 9 Apr 2023 16:56:43 +0800 Subject: [PATCH] tmp --- simp_filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/simp_filter.c b/simp_filter.c index 453aaa7..303d142 100644 --- a/simp_filter.c +++ b/simp_filter.c @@ -29,7 +29,7 @@ static int _init_filters(simp_filter_t* f) } const char* vfilters_descr = "[in]scale=1920x1080[out]"; - const char* afilters_descr = "[in]scale=1920x1080[out]"; + const char* afilters_descr = "[in]aresample=44100[out]"; simp_avio_t* io; scf_list_t* l; @@ -225,13 +225,13 @@ static int _filter_add_video(simp_avio_t* io) int64_t time = gettime() - io->start_time; int64_t vtime = vf->frame->pts * av_q2d(io->frame_rate) * 1000000LL; - scf_logi("vf->pts: %ld, vtime: %ld, time: %ld\n", vf->frame->pts, vtime, time); - if (vtime < time) { scf_list_del(&vf->list); io->nb_vframes--; pthread_mutex_unlock(&io->mutex); + scf_logi("vf->pts: %ld, vtime: %ld, time: %ld, nb_vframes: %d\n", vf->frame->pts, vtime, time, io->nb_vframes); + int ret = av_buffersrc_add_frame_flags(io->vbuffersrc_ctx, vf->frame, AV_BUFFERSRC_FLAG_KEEP_REF); simp_frame_free(vf); -- 2.25.1