}
-void
-FFmpeg::ffmpeg_log_callback (void* ptr, int level, const char* fmt, va_list vl)
-{
- if (level > AV_LOG_WARNING) {
- return;
- }
-
- char line[1024];
- static int prefix = 0;
- av_log_format_line (ptr, level, fmt, vl, line, sizeof (line), &prefix);
- string str (line);
- boost::algorithm::trim (str);
- dcpomatic_log->log (String::compose ("FFmpeg: %1", str), LogEntry::TYPE_GENERAL);
-}
-
-
void
FFmpeg::setup_general ()
{
/* This might not work too well in some cases of multiple FFmpeg decoders,
but it's probably good enough.
*/
- av_log_set_callback (FFmpeg::ffmpeg_log_callback);
+ av_log_set_callback(ffmpeg_log_callback);
_file_group.set_paths (_ffmpeg_content->paths ());
_avio_buffer = static_cast<uint8_t*> (wrapped_av_malloc(_avio_buffer_size));