Merge remote-tracking branch 'oe_21/master' into vuplus-3.0-next
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-multimedia / gstreamer1.0 / gstreamer1.0-plugins-bad / 0001-rtmp-fix-seeking-and-potential-segfault.patch
1 From bb9478be40b450629f165d5d3566f4e4a3ee1b66 Mon Sep 17 00:00:00 2001
2 From: Athanasios Oikonomou <athoik@gmail.com>
3 Date: Tue, 28 Oct 2014 08:48:20 +0200
4 Subject: [PATCH] rtmp: fix seeking and potential segfault
5
6 Segfault info: https://bugzilla.gnome.org/show_bug.cgi?id=739263
7 Seeking info: http://forums.openpli.org/topic/32910-mediaplayer-seek-doesnt-work-with-rtmp-streams/
8
9 diff --git a/ext/rtmp/gstrtmpsrc.c b/ext/rtmp/gstrtmpsrc.c
10 index b9ecfcf..8b4bf22 100644
11 --- a/ext/rtmp/gstrtmpsrc.c
12 +++ b/ext/rtmp/gstrtmpsrc.c
13 @@ -86,7 +86,6 @@ static void gst_rtmp_src_get_property (GObject * object, guint prop_id,
14      GValue * value, GParamSpec * pspec);
15  static void gst_rtmp_src_finalize (GObject * object);
16  
17 -static gboolean gst_rtmp_src_unlock (GstBaseSrc * src);
18  static gboolean gst_rtmp_src_stop (GstBaseSrc * src);
19  static gboolean gst_rtmp_src_start (GstBaseSrc * src);
20  static gboolean gst_rtmp_src_is_seekable (GstBaseSrc * src);
21 @@ -137,7 +136,6 @@ gst_rtmp_src_class_init (GstRTMPSrcClass * klass)
22  
23    gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_rtmp_src_start);
24    gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_rtmp_src_stop);
25 -  gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_rtmp_src_unlock);
26    gstbasesrc_class->is_seekable = GST_DEBUG_FUNCPTR (gst_rtmp_src_is_seekable);
27    gstbasesrc_class->prepare_seek_segment =
28        GST_DEBUG_FUNCPTR (gst_rtmp_src_prepare_seek_segment);
29 @@ -603,23 +601,6 @@ gst_rtmp_src_start (GstBaseSrc * basesrc)
30  #undef STR2AVAL
31  
32  static gboolean
33 -gst_rtmp_src_unlock (GstBaseSrc * basesrc)
34 -{
35 -  GstRTMPSrc *rtmpsrc = GST_RTMP_SRC (basesrc);
36 -
37 -  GST_DEBUG_OBJECT (rtmpsrc, "unlock");
38 -
39 -  /* This closes the socket, which means that any pending socket calls
40 -   * error out. */
41 -  if (rtmpsrc->rtmp) {
42 -    RTMP_Close (rtmpsrc->rtmp);
43 -  }
44 -
45 -  return TRUE;
46 -}
47 -
48 -
49 -static gboolean
50  gst_rtmp_src_stop (GstBaseSrc * basesrc)
51  {
52    GstRTMPSrc *src;
53 @@ -627,6 +608,7 @@ gst_rtmp_src_stop (GstBaseSrc * basesrc)
54    src = GST_RTMP_SRC (basesrc);
55  
56    if (src->rtmp) {
57 +    RTMP_Close (src->rtmp);
58      RTMP_Free (src->rtmp);
59      src->rtmp = NULL;
60    }
61 -- 
62 1.7.10.4
63