From dcb5303b4b00b32f484e8f62f229a7ce4b890d18 Mon Sep 17 00:00:00 2001 From: Moritz Grimm Date: Thu, 21 May 2015 01:24:09 +0200 Subject: [PATCH] Consistently set errstrp --- src/cfg_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cfg_encoder.c b/src/cfg_encoder.c index c322bb1..8f7b246 100644 --- a/src/cfg_encoder.c +++ b/src/cfg_encoder.c @@ -110,7 +110,7 @@ cfg_encoder_set_format_str(struct cfg_encoder *e, const char *fmt_str, { enum cfg_stream_format fmt; - if (!fmt_str) { + if (!fmt_str || !fmt_str[0]) { if (errstrp) *errstrp = "empty"; return (-1);