From 008f3c8c53760d3e5e12c55124e0aad2a805c79d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 9 Jul 2015 09:17:47 +0200 Subject: silent libav error messages --- Makefile | 2 +- mpd-notification.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a3aec1a..223690f 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ RM := rm CFLAGS += -std=c11 -O2 -Wall -Werror CFLAGS += $(shell pkg-config --cflags --libs libmpdclient) CFLAGS += $(shell pkg-config --cflags --libs libnotify) -LIBAV_CFLAGS := $(shell pkg-config --cflags --libs libavformat 2>/dev/null) +LIBAV_CFLAGS := $(shell pkg-config --cflags --libs libavformat libavutil 2>/dev/null) ifneq ($(LIBAV_CFLAGS),) CFLAGS += -DHAVE_LIBAV $(LIBAV_CFLAGS) endif diff --git a/mpd-notification.c b/mpd-notification.c index 862832a..ad3d265 100644 --- a/mpd-notification.c +++ b/mpd-notification.c @@ -271,6 +271,9 @@ int main(int argc, char ** argv) { #ifdef HAVE_LIBAV /* libav */ av_register_all(); + + /* only fatal messages from libav */ + av_log_set_level(AV_LOG_FATAL); #endif conn = mpd_connection_new(mpd_host, mpd_port, mpd_timeout); -- cgit v1.2.3-54-g00ecf