diff mbox

[FFmpeg-devel,2/2] lavf: Be more explicit in logging white/black list matches

Message ID 8385a50473a42be245e039a4d34a4047e570f770.1489253704.git.eclipse7@gmx.net
State New
Headers show

Commit Message

Alexander Strasser March 11, 2017, 5:55 p.m. UTC
The current form of the messages indicating matches in the white
or black lists seems to be a bit too much relying on context.

Make the messages more explicit.

This also matches the way codec white list errors are reported.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
---
 libavformat/avio.c  | 4 ++--
 libavformat/utils.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Michael Niedermayer March 12, 2017, 3:58 p.m. UTC | #1
On Sat, Mar 11, 2017 at 06:55:17PM +0100, Alexander Strasser wrote:
> The current form of the messages indicating matches in the white
> or black lists seems to be a bit too much relying on context.
> 
> Make the messages more explicit.
> 
> This also matches the way codec white list errors are reported.
> 
> Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
> ---
>  libavformat/avio.c  | 4 ++--
>  libavformat/utils.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

LGTM

thx

[...]
diff mbox

Patch

diff --git a/libavformat/avio.c b/libavformat/avio.c
index 9020aa9..0e29c61 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -179,12 +179,12 @@  int ffurl_connect(URLContext *uc, AVDictionary **options)
                (uc->protocol_blacklist && !strcmp(uc->protocol_blacklist, e->value)));
 
     if (uc->protocol_whitelist && av_match_list(uc->prot->name, uc->protocol_whitelist, ',') <= 0) {
-        av_log(uc, AV_LOG_ERROR, "Protocol not on whitelist '%s'!\n", uc->protocol_whitelist);
+        av_log(uc, AV_LOG_ERROR, "Protocol (%s) not on whitelist '%s'!\n", uc->prot->name, uc->protocol_whitelist);
         return AVERROR(EINVAL);
     }
 
     if (uc->protocol_blacklist && av_match_list(uc->prot->name, uc->protocol_blacklist, ',') > 0) {
-        av_log(uc, AV_LOG_ERROR, "Protocol blacklisted '%s'!\n", uc->protocol_blacklist);
+        av_log(uc, AV_LOG_ERROR, "Protocol (%s) on blacklist '%s'!\n", uc->prot->name, uc->protocol_blacklist);
         return AVERROR(EINVAL);
     }
 
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 9c8287f..542357e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -374,7 +374,7 @@  int av_demuxer_open(AVFormatContext *ic) {
     int err;
 
     if (ic->format_whitelist && av_match_list(ic->iformat->name, ic->format_whitelist, ',') <= 0) {
-        av_log(ic, AV_LOG_ERROR, "Format not on whitelist '%s'\n", ic->format_whitelist);
+        av_log(ic, AV_LOG_ERROR, "Format (%s) not on whitelist '%s'\n", ic->iformat->name, ic->format_whitelist);
         return AVERROR(EINVAL);
     }
 
@@ -554,7 +554,7 @@  int avformat_open_input(AVFormatContext **ps, const char *filename,
     }
 
     if (s->format_whitelist && av_match_list(s->iformat->name, s->format_whitelist, ',') <= 0) {
-        av_log(s, AV_LOG_ERROR, "Format not on whitelist '%s'\n", s->format_whitelist);
+        av_log(s, AV_LOG_ERROR, "Format (%s) not on whitelist '%s'\n", s->iformat->name, s->format_whitelist);
         ret = AVERROR(EINVAL);
         goto fail;
     }