Skip to content

Commit

Permalink
[gstreamer] Add 0001-streamsynchronizer-don-t-unset-DISCONT-flag.patch
Browse files Browse the repository at this point in the history
This patch has been merged already in 1.5 branch of GStreamer
  • Loading branch information
Mohammed Hassan committed Oct 30, 2014
1 parent 9717c2b commit 1bdd0e9
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
66 changes: 66 additions & 0 deletions rpm/0001-streamsynchronizer-don-t-unset-DISCONT-flag.patch
@@ -0,0 +1,66 @@
From b114d15c10d8ff8649763cf47758ddb26eacfe33 Mon Sep 17 00:00:00 2001
From: Mohammed Sameer <msameer@foolab.org>
Date: Wed, 30 Jul 2014 20:53:53 +0300
Subject: [PATCH] streamsynchronizer: don't unset DISCONT flag

unsetting DISCONT flag means we need to copy the buffer. This copy operation
mandates that all GstMemory should be copy-able which is not always the case
---
gst/playback/gststreamsynchronizer.c | 13 -------------
1 file changed, 13 deletions(-)

diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c
index 3997d1b..9e06ee7 100644
--- a/gst/playback/gststreamsynchronizer.c
+++ b/gst/playback/gststreamsynchronizer.c
@@ -66,7 +66,6 @@ typedef struct

gboolean wait; /* TRUE if waiting/blocking */
gboolean new_stream;
- gboolean drop_discont;
gboolean is_eos; /* TRUE if EOS was received */
gboolean seen_data;

@@ -244,7 +243,6 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
stream->is_eos = FALSE;
stream->stream_start_seqnum = seqnum;
stream->group_id = group_id;
- stream->drop_discont = TRUE;

if (!have_group_id) {
/* Check if this belongs to a stream that is already there,
@@ -417,7 +415,6 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
stream->is_eos = FALSE;
stream->wait = FALSE;
stream->new_stream = FALSE;
- stream->drop_discont = FALSE;
stream->seen_data = FALSE;
g_cond_broadcast (&stream->stream_finish_cond);
}
@@ -550,15 +547,6 @@ gst_stream_synchronizer_sink_chain (GstPad * pad, GstObject * parent,

if (stream) {
stream->seen_data = TRUE;
- if (stream->drop_discont) {
- if (GST_BUFFER_IS_DISCONT (buffer)) {
- GST_DEBUG_OBJECT (pad, "removing DISCONT from buffer %p", buffer);
- buffer = gst_buffer_make_writable (buffer);
- GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
- }
- stream->drop_discont = FALSE;
- }
-
if (stream->segment.format == GST_FORMAT_TIME
&& GST_CLOCK_TIME_IS_VALID (timestamp)) {
GST_LOG_OBJECT (pad,
@@ -851,7 +839,6 @@ gst_stream_synchronizer_change_state (GstElement * element,
gst_segment_init (&stream->segment, GST_FORMAT_UNDEFINED);
stream->wait = FALSE;
stream->new_stream = FALSE;
- stream->drop_discont = FALSE;
stream->is_eos = FALSE;
}
GST_STREAM_SYNCHRONIZER_UNLOCK (self);
--
2.0.0

2 changes: 2 additions & 0 deletions rpm/gst-plugins-base.spec
Expand Up @@ -10,6 +10,7 @@ License: LGPL
URL: http://gstreamer.freedesktop.org/
Vendor: GStreamer Backpackers Team <package@gstreamer.freedesktop.org>
Source: http://gstreamer.freedesktop.org/src/gst-plugins-base/gstreamer1.0-plugins-base-%{version}.tar.xz
Patch0: 0001-streamsynchronizer-don-t-unset-DISCONT-flag.patch
Requires: orc >= 0.4.18
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(orc-0.4) >= 0.4.18
Expand Down Expand Up @@ -49,6 +50,7 @@ GStreamer Plugins Base library applications

%prep
%setup -q -n gstreamer1.0-plugins-base-%{version}/gst-plugins-base
%patch0 -p1

%build
NOCONFIGURE=1 ./autogen.sh
Expand Down

0 comments on commit 1bdd0e9

Please sign in to comment.