[vlc-commits] livehttp: tell if playlist is vod

Ilkka Ollakka git at videolan.org
Sun Mar 17 16:52:22 CET 2013


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Mar 17 17:45:46 2013 +0200| [8dbd863c7ce5f194a80b05109b9800e6d1f7a9b8] | committer: Ilkka Ollakka

livehttp: tell if playlist is vod

Mark EXT-X-PLAYLSIT-TYPE:EVENT if it's still under generating and at the
end, mark it as VOD in cases where we keep all the segments and those
are in playlist.

Closes: #6919

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8dbd863c7ce5f194a80b05109b9800e6d1f7a9b8
---

 modules/access_output/livehttp.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/access_output/livehttp.c b/modules/access_output/livehttp.c
index 2878adb..cf5d6d7 100644
--- a/modules/access_output/livehttp.c
+++ b/modules/access_output/livehttp.c
@@ -434,7 +434,11 @@ static int updateIndexAndDel( sout_access_out_t *p_access, sout_access_out_sys_t
             return -1;
         }
 
-        if ( fprintf( fp, "#EXTM3U\n#EXT-X-TARGETDURATION:%zu\n#EXT-X-VERSION:3\n#EXT-X-ALLOW-CACHE:%s\n#EXT-X-MEDIA-SEQUENCE:%"PRIu32"\n", p_sys->i_seglen, p_sys->b_caching ? "YES" : "NO",i_firstseg ) < 0 )
+        if ( fprintf( fp, "#EXTM3U\n#EXT-X-TARGETDURATION:%zu\n#EXT-X-VERSION:3\n#EXT-X-ALLOW-CACHE:%s"
+                          "%s\n#EXT-X-MEDIA-SEQUENCE:%"PRIu32"\n", p_sys->i_seglen,
+                          p_sys->b_caching ? "YES" : "NO",
+                          p_sys->i_numsegs > 0 ? "" : b_isend ? "\n#EXT-X-PLAYLIST-TYPE:VOD" : "\n#EXT-X-PLAYLIST-TYPE:EVENT",
+                          i_firstseg ) < 0 )
         {
             free( psz_idxTmp );
             fclose( fp );



More information about the vlc-commits mailing list