[FFmpeg-devel] [PATCH] lavf/hlsenc: fix basename size computation off-by-one bug
Stefano Sabatini
stefasab at gmail.com
Fri Dec 21 00:29:56 CET 2012
---
libavformat/hlsenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index d5058a1..07aa4ff 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -178,7 +178,7 @@ static int hls_write_header(AVFormatContext *s)
int ret, i;
char *p;
const char *pattern = "%d.ts";
- int basename_size = strlen(s->filename) + strlen(pattern);
+ int basename_size = strlen(s->filename) + strlen(pattern) + 1;
hls->number = 0;
--
1.7.9.5
More information about the ffmpeg-devel
mailing list