Jump to content


Photo

Problem playing live HLS stream with gstreamer.


  • Please log in to reply
22 replies to this topic

Re: Problem playing live HLS stream with gstreamer. #21 Alexvrs

  • Senior Member
  • 36 posts

+4
Neutral

Posted 7 August 2015 - 11:59

I tested the patch, here's the final version of the small Fix syntax, everything works as it is necessary!

diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c
index 5e78d94..c080a95 100755
--- a/ext/hls/m3u8.c
+++ b/ext/hls/m3u8.c
@@ -850,17 +850,16 @@ gst_m3u8_client_update (GstM3U8Client * self, gchar * data)
   }
 
   if (m3u8->files && self->sequence == -1) {
-    self->current_file = g_list_first (m3u8->files);
     if (GST_M3U8_CLIENT_IS_LIVE (self)) {
       /* for live streams, start GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE from
          the end of the playlist. See section 6.3.3 of HLS draft */
       gint pos =
           g_list_length (m3u8->files) - GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE;
-      self->sequence =
-          GST_M3U8_MEDIA_FILE (g_list_nth_data (m3u8->files,
-              pos >= 0 ? pos : 0))->sequence;
+      self->current_file = g_list_nth (m3u8->files,
+              pos >= 0 ? pos : 0);
     } else
-      self->sequence = GST_M3U8_MEDIA_FILE (self->current_file->data)->sequence;
+      self->current_file = g_list_first (m3u8->files);
+    self->sequence = GST_M3U8_MEDIA_FILE (self->current_file->data)->sequence;
     self->sequence_position = 0;
     GST_DEBUG ("Setting first sequence at %u", (guint) self->sequence);
   }

Tnx @Athanasios Oikonomou


Один — стоит, Единый движется.


Re: Problem playing live HLS stream with gstreamer. #22 Alexvrs

  • Senior Member
  • 36 posts

+4
Neutral

Posted 7 August 2015 - 12:01

 

Yes :)


Один — стоит, Единый движется.


Re: Problem playing live HLS stream with gstreamer. #23 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 7 August 2015 - 13:35

Thank you Alexvrs,

 

I've included it my gstreamer 1.x testing images.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users