From 2a82fb47bc16d959cec59f19acc75115beacc79f Mon Sep 17 00:00:00 2001 From: wangjiajun Date: Sat, 12 Oct 2024 15:56:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8E=BB=E9=99=A4isFirstFrameReaded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangjiajun --- src/pulsecore/sink-input.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index af15ae219..d479c8e8e 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -632,8 +632,6 @@ int pa_sink_input_new( i->thread_info.dont_rewrite = false; i->origin_rewind_bytes = 0; - pa_atomic_store(&i->isFirstReaded, 0); - pa_assert_se(pa_idxset_put(core->sink_inputs, i, &i->index) == 0); pa_assert_se(pa_idxset_put(i->sink->inputs, pa_sink_input_ref(i), NULL) == 0); @@ -2749,7 +2747,7 @@ void pa_sink_input_set_preferred_sink(pa_sink_input *i, pa_sink *s) { } void pa_sink_input_handle_ohos_underrun(pa_sink_input *i) { - if (i->process_underrun_ohos && (pa_atomic_load(&i->isFirstReaded) == 1)) { + if (i->process_underrun_ohos) { i->process_underrun_ohos(i); } } -- Gitee From d0d944a11e8987e3b5d1ea2347542702f7fd7404 Mon Sep 17 00:00:00 2001 From: wangjiajun Date: Sat, 12 Oct 2024 16:12:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8E=BB=E9=99=A4isFirstFrameReaded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangjiajun --- src/pulsecore/sink-input.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h index b6f4f0b56..c7e3d793b 100644 --- a/src/pulsecore/sink-input.h +++ b/src/pulsecore/sink-input.h @@ -283,8 +283,6 @@ struct pa_sink_input { } thread_info; void *userdata; - - pa_atomic_t isFirstReaded; }; PA_DECLARE_PUBLIC_CLASS(pa_sink_input); -- Gitee