[OE-core] [poky][PATCH 04/13] gstreamer1.0-plugins-base: Make gstaudiobasesink print warning instead of returning ERROR

Yuqing Zhu b54851 at freescale.com
Mon Jan 18 09:32:53 UTC 2016


For those clips with corrupt audio track,
there might be no output from audio decoder
and thus the audio track have no chance to negotiate.
We can just print error warning instead of return ERROR,
so that other track can be played normally.

Signed-off-by: Yuqing Zhu <b54851 at freescale.com>
---
 ...esink-print-warning-istead-of-return-ERRO.patch | 47 ++++++++++++++++++++++
 .../gstreamer/gstreamer1.0-plugins-base_1.6.2.bb   |  1 +
 2 files changed, 48 insertions(+)
 create mode 100755 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch
new file mode 100755
index 0000000..cf56afc
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch
@@ -0,0 +1,47 @@
+From 5d83c4db60646ce077dfb2460b59c9d30ce06b04 Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.wang at freescale.com>
+Date: Tue, 17 Nov 2015 14:56:47 +0800
+Subject: [PATCH] gstaudiobasesink print warning istead of return ERROR.
+
+For those clips with corrupt audio track,
+there might be no output from audio decoder
+and thus the audio track have no chance to negotiate.
+We can just print error warning instead of return ERROR,
+so that other track can be played normally
+
+https://bugzilla.gnome.org/show_bug.cgi?id=758215
+
+Upstream-Status:  Pending
+
+Signed-off-by: Lyon Wang <lyon.wang at freescale.com>
+---
+ gst-libs/gst/audio/gstaudiobasesink.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+ mode change 100644 => 100755 gst-libs/gst/audio/gstaudiobasesink.c
+
+diff --git a/gst-libs/gst/audio/gstaudiobasesink.c b/gst-libs/gst/audio/gstaudiobasesink.c
+old mode 100644
+new mode 100755
+index 704801e..a4a716b
+--- a/gst-libs/gst/audio/gstaudiobasesink.c
++++ b/gst-libs/gst/audio/gstaudiobasesink.c
+@@ -1133,10 +1133,15 @@ gst_audio_base_sink_wait_event (GstBaseSink * bsink, GstEvent * event)
+     case GST_EVENT_GAP:
+       /* We must have a negotiated format before starting the ringbuffer */
+       if (G_UNLIKELY (!gst_audio_ring_buffer_is_acquired (sink->ringbuffer))) {
+-        GST_ELEMENT_ERROR (sink, STREAM, FORMAT, (NULL),
++  /*      GST_ELEMENT_ERROR (sink, STREAM, FORMAT, (NULL),
+             ("Sink not negotiated before %s event.",
+                 GST_EVENT_TYPE_NAME (event)));
++
+         return GST_FLOW_ERROR;
++   */
++        /* consider there might be chance that corrupt audio track without output buffer and not negotiated.
++             We'd better not return error and quit play, video track can keep playing.*/
++        GST_ERROR_OBJECT(sink, "Sink not negotiated before %s event.",GST_EVENT_TYPE_NAME (event));
+       }
+ 
+       gst_audio_base_sink_force_start (sink);
+-- 
+1.9.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
index 014f081..2e7952b 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
@@ -11,6 +11,7 @@ SRC_URI += "file://get-caps-from-src-pad-when-query-caps.patch \
             file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
             file://0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
             file://0006-handle-audio-video-decoder-error.patch \
+            file://0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch \
 "
 
 SRC_URI[md5sum] = "f530fbbe287edce79c55a37bd1a39fe2"
-- 
1.9.1




More information about the Openembedded-core mailing list