diff options
Diffstat (limited to 'src/decoder/libav_decoder_plugin.c')
-rw-r--r-- | src/decoder/libav_decoder_plugin.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/decoder/libav_decoder_plugin.c b/src/decoder/libav_decoder_plugin.c index 2b37e67d..88dd4a8f 100644 --- a/src/decoder/libav_decoder_plugin.c +++ b/src/decoder/libav_decoder_plugin.c @@ -54,35 +54,6 @@ typedef struct LibavDecContext { AVStream *ast; } LibavDecContext; -static GLogLevelFlags level_libav_to_glib(int level) -{ - if (level <= AV_LOG_FATAL) - return G_LOG_LEVEL_CRITICAL; - - if (level <= AV_LOG_ERROR) - return G_LOG_LEVEL_WARNING; - - if (level <= AV_LOG_INFO) - return G_LOG_LEVEL_MESSAGE; - - return G_LOG_LEVEL_DEBUG; -} - -static void mpd_libav_log_callback(void *ptr, int level, - const char *fmt, va_list vl) -{ - const AVClass * cls = NULL; - - if (ptr != NULL) - cls = *(const AVClass *const*)ptr; - - if (cls != NULL) { - char *domain = g_strconcat(G_LOG_DOMAIN, "/", cls->item_name(ptr), NULL); - g_logv(domain, level_libav_to_glib(level), fmt, vl); - g_free(domain); - } -} - static int mpd_libav_stream_read(void *opaque, uint8_t *buf, int size) { LibavDecContext *stream = opaque; @@ -176,15 +147,6 @@ fail: return ret; } -static bool -libav_init(const struct config_param *param) -{ - av_log_set_callback(mpd_libav_log_callback); - - av_register_all(); - return true; -} - static double time_from_libav(int64_t t, const AVRational time_base) { assert(t != (int64_t)AV_NOPTS_VALUE); @@ -524,7 +486,6 @@ static const char *const libav_mime_types[] = { const struct decoder_plugin libav_decoder_plugin = { .name = "libav", - .init = libav_init, .stream_decode = libav_decode, .scan_stream = libav_scan_stream, .suffixes = libav_suffixes, |