diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-05-24 20:38:23 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-05-24 20:38:23 +0000 |
commit | 27a669ab0013655d228f986c81f5246541aade2f (patch) | |
tree | 9912df4ead48953240e70c79842d41b7d1531343 /libavfilter | |
parent | 046f49baa249115e99d40fe3462348b4dd675ee0 (diff) | |
download | ffmpeg-streaming-27a669ab0013655d228f986c81f5246541aade2f.zip ffmpeg-streaming-27a669ab0013655d228f986c81f5246541aade2f.tar.gz |
Better error messages
Commited in SoC by Vitor Sessak on 2008-04-06 11:09:29
Originally committed as revision 13288 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/graphparser.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index 0a77d07..d54f97d 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -50,8 +50,14 @@ static int create_filter(AVFilterGraph *ctx, int index, char *name, char tmp[20]; snprintf(tmp, 20, "%d", index); - if(!(filterdef = avfilter_get_by_name(name)) || - !(filt = avfilter_open(filterdef, tmp))) { + + if(!(filterdef = avfilter_get_by_name(name))) { + av_log(&log_ctx, AV_LOG_ERROR, + "no such filter: '%s'\n", name); + return -1; + } + + if(!(filt = avfilter_open(filterdef, tmp))) { av_log(&log_ctx, AV_LOG_ERROR, "error creating filter '%s'\n", name); return -1; @@ -62,7 +68,7 @@ static int create_filter(AVFilterGraph *ctx, int index, char *name, if(avfilter_init_filter(filt, args, NULL)) { av_log(&log_ctx, AV_LOG_ERROR, - "error initializing filter '%s'\n", name); + "error initializing filter '%s' with args '%s'\n", name, args); return -1; } |