[FFmpeg-cvslog] hlsenc: use the basename to generate the list entries

Luca Barbato git at videolan.org
Sun Dec 30 14:01:41 CET 2012


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Mon Dec 24 00:08:35 2012 +0100| [66f7b4862fe9fd1828a6729df5d04a499af227db] | committer: Luca Barbato

hlsenc: use the basename to generate the list entries

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=66f7b4862fe9fd1828a6729df5d04a499af227db
---

 libavformat/hlsenc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index eade740..418c87d 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -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;



More information about the ffmpeg-cvslog mailing list