summaryrefslogtreecommitdiff
path: root/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mpegtsmux-Need-get-pid-when-create-streams.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mpegtsmux-Need-get-pid-when-create-streams.patch')
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mpegtsmux-Need-get-pid-when-create-streams.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mpegtsmux-Need-get-pid-when-create-streams.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mpegtsmux-Need-get-pid-when-create-streams.patch
new file mode 100644
index 0000000..4e5a455
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mpegtsmux-Need-get-pid-when-create-streams.patch
@@ -0,0 +1,44 @@
+From 0d97f9e8693a498d10ea9ad68caa4f6305c1114e Mon Sep 17 00:00:00 2001
+From: Song Bing <b06498@freescale.com>
+Date: Wed, 22 Apr 2015 18:06:35 +0800
+Subject: [PATCH 01/26] 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.
+
+Upstream-Status: Pending [https://bugzilla.gnome.org/show_bug.cgi?id=748288]
+
+---
+ gst/mpegtsmux/mpegtsmux.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
+index 67c2b72..cfd7c2a 100644
+--- a/gst/mpegtsmux/mpegtsmux.c
++++ b/gst/mpegtsmux/mpegtsmux.c
+@@ -833,6 +833,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
+