OSDN Git Service

hlsenc: use the basename to generate the list entries
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 23 Dec 2012 23:08:35 +0000 (00:08 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 29 Dec 2012 16:26:29 +0000 (17:26 +0100)
The segment path is desumed from the playlist path, recording a
relative path in the playlist while serving the file could lead
to misleading results.

libavformat/hlsenc.c

index eade740..418c87d 100644 (file)
@@ -85,7 +85,8 @@ static int append_entry(HLSContext *hls, uint64_t duration)
     if (!en)
         return AVERROR(ENOMEM);
 
-    av_get_frame_filename(en->name, sizeof(en->name), hls->basename,
+    av_get_frame_filename(en->name, sizeof(en->name),
+                          av_basename(hls->basename),
                           hls->number -1);
 
     en->duration = duration;