From e954f4f63be62a9aa4c67625021798a56131ad90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=BF=8A=E8=88=AA?= Date: Wed, 12 Apr 2023 07:37:13 +0000 Subject: [PATCH] =?UTF-8?q?L358:avcType.nBFrames=20=3D=200;=20L360:avcType?= =?UTF-8?q?.nRefFrames=20=3D=20avcType.nBFrames=20=3D=3D=200=20=3F=201=20:?= =?UTF-8?q?=202;=20=E5=88=A4=E6=96=AD=E6=B0=B8=E7=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 马俊航 --- .../gstreamer/plugins/codec/common/vdec/gst_vdec_base.cpp | 2 +- .../plugins/codec/hdi_plugins/hdi_venc_params_mgr.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/services/engine/gstreamer/plugins/codec/common/vdec/gst_vdec_base.cpp b/services/engine/gstreamer/plugins/codec/common/vdec/gst_vdec_base.cpp index 2908af31..97993597 100644 --- a/services/engine/gstreamer/plugins/codec/common/vdec/gst_vdec_base.cpp +++ b/services/engine/gstreamer/plugins/codec/common/vdec/gst_vdec_base.cpp @@ -1308,7 +1308,7 @@ static gboolean gst_vdec_base_push_out_buffers(GstVdecBase *self) static void gst_vdec_base_loop(GstVdecBase *self) { GST_DEBUG_OBJECT(self, "Loop in"); - g_return_if_fail(self != nullptr || self->decoder != nullptr); + g_return_if_fail(self != nullptr && self->decoder != nullptr); GstBuffer *gst_buffer = nullptr; if (gst_vdec_base_push_out_buffers(self) != TRUE) { diff --git a/services/engine/gstreamer/plugins/codec/hdi_plugins/hdi_venc_params_mgr.cpp b/services/engine/gstreamer/plugins/codec/hdi_plugins/hdi_venc_params_mgr.cpp index a80075c3..4333b13f 100644 --- a/services/engine/gstreamer/plugins/codec/hdi_plugins/hdi_venc_params_mgr.cpp +++ b/services/engine/gstreamer/plugins/codec/hdi_plugins/hdi_venc_params_mgr.cpp @@ -357,7 +357,8 @@ int32_t HdiVencParamsMgr::InitAvcParamters(GstElement *element) // need more paramters avcType.nBFrames = 0; // when have b frame default ref frame is 2 - avcType.nRefFrames = avcType.nBFrames == 0 ? 1 : 2; + //avcType.nRefFrames = avcType.nBFrames == 0 ? 1 : 2; + avcType.nRefFrames = 1 ; avcType.nPFrames = (uint32_t)(base->frame_rate * base->i_frame_interval_new) / (avcType.nBFrames + 1) - 1; avcType.bEntropyCodingCABAC = OMX_TRUE; avcType.bWeightedPPrediction = OMX_TRUE; -- Gitee