tmp
authoryu.dongliang <18588496441@163.com>
Sun, 9 Apr 2023 08:56:43 +0000 (16:56 +0800)
committeryu.dongliang <18588496441@163.com>
Sun, 9 Apr 2023 08:56:43 +0000 (16:56 +0800)
simp_filter.c

index 453aaa774234334df616d1fc4697832db1be4308..303d1429acc12045918e7750d921455ac9ae0701 100644 (file)
@@ -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);