From 20fdec1b0e722b8d16dc96c870be44eb903d4d16 Mon Sep 17 00:00:00 2001 From: Andy Hu Date: Fri, 7 Jan 2022 21:04:22 +0800 Subject: [PATCH] sf-gst-omx: update to fix issue for gst-play 1. recorrect the queue index for patches name 2. USE_BUFFER is only available for dma buffer. If not dma buffer, don't come into it. sw.multimedia (cherry picked from http://192.168.110.45/jh7100/buildroot/-/commit/5249d14e587639c534b8084a541ec84bc1e953f0) --- ...atch => 0005-rank-257-for-sf-codecs.patch} | 0 ...nt-invoke-USE_BUFFER-if-no-dmabuffer.patch | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+) rename package/starfive/sf-gst-omx/{0004-rank-257-for-sf-codecs.patch => 0005-rank-257-for-sf-codecs.patch} (100%) create mode 100644 package/starfive/sf-gst-omx/0006-dont-invoke-USE_BUFFER-if-no-dmabuffer.patch diff --git a/package/starfive/sf-gst-omx/0004-rank-257-for-sf-codecs.patch b/package/starfive/sf-gst-omx/0005-rank-257-for-sf-codecs.patch similarity index 100% rename from package/starfive/sf-gst-omx/0004-rank-257-for-sf-codecs.patch rename to package/starfive/sf-gst-omx/0005-rank-257-for-sf-codecs.patch diff --git a/package/starfive/sf-gst-omx/0006-dont-invoke-USE_BUFFER-if-no-dmabuffer.patch b/package/starfive/sf-gst-omx/0006-dont-invoke-USE_BUFFER-if-no-dmabuffer.patch new file mode 100644 index 00000000..518e60b8 --- /dev/null +++ b/package/starfive/sf-gst-omx/0006-dont-invoke-USE_BUFFER-if-no-dmabuffer.patch @@ -0,0 +1,19 @@ +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -718,6 +718,15 @@ + goto out; + } + ++#ifdef USE_OMX_TARGET_STARFIVE ++ if ( !gst_is_dmabuf_memory (mem)) { ++ GST_INFO_OBJECT (self, ++ " %d-th buffer doesn't contain dmabuf, go to out. port->port_def.nBufferSize: %d", ++ i, port->port_def.nBufferSize); ++ goto out; ++ } ++#endif ++ + *frame = g_slice_new0 (GstVideoFrame); + + is_mapped = gst_video_frame_map (*frame, v_info, buffer, flags); +