]> git.sesse.net Git - ffmpeg/commitdiff
avformat/hlsenc: better error log message for var_stream_map content
authorBela Bodecs <bodecsb@vivanet.hu>
Sat, 22 Jun 2019 13:55:54 +0000 (15:55 +0200)
committerSteven Liu <lq@chinaffmpeg.org>
Mon, 24 Jun 2019 09:43:39 +0000 (17:43 +0800)
When multiple variant streams are specified by var_stream_map option,
%v is expected either in the filename or in the last sub-directory name,
but only in one of them. When both of them contains %v string, current
error message only states half of the truth.
And even %v may appears several times inside the last sub-directory name
or in filename pattern.
This patch clarifies this in the log message and in the doc also.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
doc/muxers.texi
libavformat/hlsenc.c

index 4410a5f5bb9d23cea69d5e1fc66ae19e4e2a38c5..6c5b4bb637dd52cef31e7109f96d46a323582ffd 100644 (file)
@@ -656,7 +656,8 @@ This example will produce the playlists segment file sets:
 @file{file_1_000.ts}, @file{file_1_001.ts}, @file{file_1_002.ts}, etc.
 
 The string "%v" may be present in the filename or in the last directory name
-containing the file. If the string is present in the directory name, then
+containing the file, but only in one of them. (Additionally, %v may appear multiple times in the last
+sub-directory or filename.) If the string %v is present in the directory name, then
 sub-directories are created after expanding the directory name pattern. This
 enables creation of segments corresponding to different variant streams in
 subdirectories.
index f6330ec2d57da2b90a6715ab0d7c50fe81caab95..9f5eee54916ae0c696cb2163f4dcd6f3762ce45c 100644 (file)
@@ -1792,15 +1792,15 @@ static int validate_name(int nb_vs, const char *fn)
     subdir_name = av_dirname(fn_dup);
 
     if (nb_vs > 1 && !av_stristr(filename, "%v") && !av_stristr(subdir_name, "%v")) {
-        av_log(NULL, AV_LOG_ERROR, "More than 1 variant streams are present, %%v is expected in the filename %s\n",
-                fn);
+        av_log(NULL, AV_LOG_ERROR, "More than 1 variant streams are present, %%v is expected "
+               "either in the filename or in the sub-directory name of file %s\n", fn);
         ret = AVERROR(EINVAL);
         goto fail;
     }
 
     if (av_stristr(filename, "%v") && av_stristr(subdir_name, "%v")) {
-        av_log(NULL, AV_LOG_ERROR, "%%v is expected either in filename or in the sub-directory name of file %s\n",
-                fn);
+        av_log(NULL, AV_LOG_ERROR, "%%v is expected either in the filename or "
+               "in the sub-directory name of file %s, but only in one of them\n", fn);
         ret = AVERROR(EINVAL);
         goto fail;
     }