You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.1 KiB
65 lines
2.1 KiB
6 years ago
|
From cd1832688e660e26054445041d6b79734d1f1089 Mon Sep 17 00:00:00 2001
|
||
7 years ago
|
From: Athanasios Oikonomou <athoik@gmail.com>
|
||
|
Date: Tue, 28 Oct 2014 08:48:20 +0200
|
||
|
Subject: [PATCH] rtmp: fix seeking and potential segfault
|
||
|
|
||
|
Segfault info: https://bugzilla.gnome.org/show_bug.cgi?id=739263
|
||
|
Seeking info: http://forums.openpli.org/topic/32910-mediaplayer-seek-doesnt-work-with-rtmp-streams/
|
||
|
|
||
6 years ago
|
---
|
||
|
ext/rtmp/gstrtmpsrc.c | 20 +-------------------
|
||
|
1 file changed, 1 insertion(+), 19 deletions(-)
|
||
|
|
||
7 years ago
|
diff --git a/ext/rtmp/gstrtmpsrc.c b/ext/rtmp/gstrtmpsrc.c
|
||
6 years ago
|
index 12931a2..52db7f4 100644
|
||
7 years ago
|
--- a/ext/rtmp/gstrtmpsrc.c
|
||
|
+++ b/ext/rtmp/gstrtmpsrc.c
|
||
6 years ago
|
@@ -89,7 +89,6 @@ static void gst_rtmp_src_get_property (GObject * object, guint prop_id,
|
||
7 years ago
|
static void gst_rtmp_src_finalize (GObject * object);
|
||
|
|
||
7 years ago
|
static gboolean gst_rtmp_src_connect (GstRTMPSrc * src);
|
||
7 years ago
|
-static gboolean gst_rtmp_src_unlock (GstBaseSrc * src);
|
||
|
static gboolean gst_rtmp_src_stop (GstBaseSrc * src);
|
||
|
static gboolean gst_rtmp_src_start (GstBaseSrc * src);
|
||
|
static gboolean gst_rtmp_src_is_seekable (GstBaseSrc * src);
|
||
6 years ago
|
@@ -145,7 +144,6 @@ gst_rtmp_src_class_init (GstRTMPSrcClass * klass)
|
||
7 years ago
|
|
||
|
gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_rtmp_src_start);
|
||
|
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_rtmp_src_stop);
|
||
|
- gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_rtmp_src_unlock);
|
||
|
gstbasesrc_class->is_seekable = GST_DEBUG_FUNCPTR (gst_rtmp_src_is_seekable);
|
||
|
gstbasesrc_class->prepare_seek_segment =
|
||
|
GST_DEBUG_FUNCPTR (gst_rtmp_src_prepare_seek_segment);
|
||
6 years ago
|
@@ -644,23 +642,6 @@ error:
|
||
|
return FALSE;
|
||
|
}
|
||
7 years ago
|
|
||
6 years ago
|
-static gboolean
|
||
7 years ago
|
-gst_rtmp_src_unlock (GstBaseSrc * basesrc)
|
||
|
-{
|
||
|
- GstRTMPSrc *rtmpsrc = GST_RTMP_SRC (basesrc);
|
||
|
-
|
||
|
- GST_DEBUG_OBJECT (rtmpsrc, "unlock");
|
||
|
-
|
||
|
- /* This closes the socket, which means that any pending socket calls
|
||
|
- * error out. */
|
||
|
- if (rtmpsrc->rtmp) {
|
||
|
- RTMP_Close (rtmpsrc->rtmp);
|
||
|
- }
|
||
|
-
|
||
|
- return TRUE;
|
||
|
-}
|
||
|
-
|
||
|
-
|
||
6 years ago
|
static gboolean
|
||
7 years ago
|
gst_rtmp_src_stop (GstBaseSrc * basesrc)
|
||
|
{
|
||
6 years ago
|
@@ -669,6 +650,7 @@ gst_rtmp_src_stop (GstBaseSrc * basesrc)
|
||
7 years ago
|
src = GST_RTMP_SRC (basesrc);
|
||
|
|
||
|
if (src->rtmp) {
|
||
|
+ RTMP_Close (src->rtmp);
|
||
|
RTMP_Free (src->rtmp);
|
||
|
src->rtmp = NULL;
|
||
|
}
|