[vlc-devel] HLS in Android and #EXT-X-DISCONTINUITY

Rafaël Carré funman at videolan.org
Fri Oct 25 12:57:52 CEST 2013


Hello,

Le 24/10/2013 16:18, Nelson Perez a écrit :
> Hello, I've been testing the HLS support for the Android platform and it
> works fine. There were some problems before, but apparently they are all
> fixed now. The only problem I found today has to do with handling
> the #EXT-X-DISCONTINUITY tag.
> 
> Every time this tag appears on the m3u8 manifest file, the playback is
> interrupted and the app freezes. I'm particularly interested in correctly
> handling this event because I'm trying to develop a system where new
> streams are started on demand by the users and these newly created streams
> all come with this tag on the first fragment.
> 
> The documentation<http://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-6.3.3>states
> that:
> 
> The client MUST be prepared to reset its parser(s) and decoder(s)
>    before playing a media segment that has an EXT-X-DISCONTINUITY tag
>    applied to it.
> 
> 
> But it's not clear to me how this should be done in the context of
> libvlc. Taking a look at the source code
> <http://www.videolan.org/developers/vlc/modules/stream_filter/httplive.c>
> I found the parse_Discontinuity function, that should probably handle
> this event.
> 
> 
> static int parse_Discontinuity(stream_t *s, hls_stream_t *hls, char *p_read)
> {
>     assert(hls);
> 
>     /* FIXME: Do we need to act on discontinuity ?? */
>     msg_Dbg(s, "#EXT-X-DISCONTINUITY %s", p_read);
>     return VLC_SUCCESS;
> 
> }
> 
> 
> But as you can see it currently doesn't do much. Any help will be appreciated.

I think as a first step you should look at VLC messages to see why VLC
freezes.

I was under the impression that resolution/frame rate changes were
supported already in HLS, is that right?

If yes then handling discontinuities should be as easy as handling
segment boundaries with changing resolution/framerate.

> Nelson



More information about the vlc-devel mailing list