[OE-core] [poky][PATCH 07/13] gstreamer1.0-plugins-bad: Fix mpegtsmux get wrong pid

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


When camerabin use mpegtsmux as muxer to start video recording and then
stop video recording and then start video recording again, mpegtsmux will
get wrong pid.
Need to get pid when create streams.

Signed-off-by: Yuqing Zhu <b54851 at freescale.com>
---
 ...pegtsmux-Need-get-pid-when-create-streams.patch | 45 ++++++++++++++++++++++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb    |  4 +-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100755 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch
new file mode 100755
index 0000000..f2c063f
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch
@@ -0,0 +1,45 @@
+From 3e0bc017ca9b4e093484ee6b3b73917918364e92 Mon Sep 17 00:00:00 2001
+From: Song Bing <b06498 at freescale.com>
+Date: Wed, 22 Apr 2015 18:06:35 +0800
+Subject: [PATCH 02/10] mpegtsmux: Need get pid when create streams.
+
+when camerabin use mpegtsmux as muxer, start video recording and then
+stop video recording and then start video recording, mpegtsmux get wrong
+pid.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=748288
+
+Upstream-Status: Pending
+---
+ gst/mpegtsmux/mpegtsmux.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
+index c3a0dbb..5a6d9e1 100644
+--- a/gst/mpegtsmux/mpegtsmux.c
++++ b/gst/mpegtsmux/mpegtsmux.c
+@@ -761,6 +761,21 @@ mpegtsmux_create_streams (MpegTsMux * mux)
+       } else {
+         ts_data->prog_id = DEFAULT_PROG_ID;
+       }
++
++      if (!ts_data->pid) {
++        gint pid = -1;
++
++        name = GST_PAD_NAME (c_data->pad);
++        if (name != NULL && sscanf (name, "sink_%d", &pid) == 1) {
++          if (tsmux_find_stream (mux->tsmux, pid)) {
++            GST_WARNING_OBJECT (mux, "Duplicate PID");
++          }
++        } else {
++          pid = tsmux_get_new_pid (mux->tsmux);
++        }
++
++        ts_data->pid = pid;
++      }
+     }
+ 
+     ts_data->prog =
+-- 
+1.9.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
index 284e1f2..3f30f86 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
                     file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
                     file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50"
 
-SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch"
+SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch \
+            file://0002-mpegtsmux-Need-get-pid-when-create-streams.patch \
+"
 
 SRC_URI[md5sum] = "7c73bec1d389f0e184ebbbbb9e9f883d"
 SRC_URI[sha256sum] = "650855e39ff56a8bb6cb0c192109c5926ce12f536d06e19ebf829de71ef396fe"
-- 
1.9.1




More information about the Openembedded-core mailing list