fix ticket: 7527
Signed-off-by: Steven Liu <[email protected]>
---
libavformat/hlsenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index f8f060d065..3e4f2b6c8b 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -461,7 +461,7 @@ static int hls_delete_old_segments(AVFormatContext *s,
HLSContext *hls,
char * r_dirname = dirname;
/* if %v is present in the file's directory */
- if (av_stristr(dirname, "%v")) {
+ if (dirname && av_stristr(dirname, "%v")) {
if (replace_int_data_in_filename(&r_dirname, dirname, 'v',
segment->var_stream_idx) < 1) {
ret = AVERROR(EINVAL);
--
2.15.2 (Apple Git-101.1)
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel