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.
64 lines
2.0 KiB
64 lines
2.0 KiB
7 years ago
|
From bb9478be40b450629f165d5d3566f4e4a3ee1b66 Mon Sep 17 00:00:00 2001
|
||
|
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/
|
||
|
|
||
|
diff --git a/ext/rtmp/gstrtmpsrc.c b/ext/rtmp/gstrtmpsrc.c
|
||
|
index b9ecfcf..8b4bf22 100644
|
||
7 years ago
|
--- a/ext/rtmp/gstrtmpsrc.c
|
||
|
+++ b/ext/rtmp/gstrtmpsrc.c
|
||
7 years ago
|
@@ -89,7 +89,6 @@
|
||
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);
|
||
7 years ago
|
@@ -137,7 +136,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);
|
||
7 years ago
|
@@ -603,23 +601,6 @@ gst_rtmp_src_start (GstBaseSrc * basesrc)
|
||
7 years ago
|
#undef STR2AVAL
|
||
|
|
||
|
static gboolean
|
||
|
-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;
|
||
|
-}
|
||
|
-
|
||
|
-
|
||
|
-static gboolean
|
||
|
gst_rtmp_src_stop (GstBaseSrc * basesrc)
|
||
|
{
|
||
|
GstRTMPSrc *src;
|
||
7 years ago
|
@@ -627,6 +608,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;
|
||
|
}
|
||
7 years ago
|
--
|
||
|
1.7.10.4
|
||
7 years ago
|
|