From 90a36b905031fb7eb75ecb9c7e2fbd70c9135a20 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Tue, 12 Dec 2023 19:28:41 +0900 Subject: [PATCH] filter::python3: do not break converter/decoder A python-global reference counter is required for py-finalize. This is workaround before applying such a global reference counter. Signed-off-by: MyungJoo Ham --- ext/nnstreamer/tensor_filter/tensor_filter_python3.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ext/nnstreamer/tensor_filter/tensor_filter_python3.cc b/ext/nnstreamer/tensor_filter/tensor_filter_python3.cc index d27d7b2..3611893 100644 --- a/ext/nnstreamer/tensor_filter/tensor_filter_python3.cc +++ b/ext/nnstreamer/tensor_filter/tensor_filter_python3.cc @@ -858,7 +858,17 @@ fini_filter_py (void) PyEval_RestoreThread (st); nnstreamer_filter_exit (NNS_support_python.v0.name); +/** + * @todo Remove below lines after this issue is addressed. + * Tizen issues: After python version has been upgraded from 3.9.1 to 3.9.10, + * python converter is stopped at Py_Finalize. Since Py_Initialize is not called + * twice from this object, Py_Finalize is temporarily removed. + * We do not know if it's safe to call this at this point. + * We can finalize when ALL python subplugins share the same ref counter. + */ +#if 0 /** Python should be initialized and finalized only once */ if (Py_IsInitialized ()) Py_Finalize (); +#endif } -- 2.7.4