summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-02-23 23:35:40 +0100
committerCarl Hetherington <cth@carlh.net>2023-03-03 01:17:41 +0100
commit69957d093fd1cb798449271e6212cd86321d5528 (patch)
tree02fa032c1a9d95b28cdcd127f4f9d8a66bca1c34 /src/lib/ffmpeg.cc
parent0a4c399e8ed2ebb8b7dadf2684595effd1ca9f3e (diff)
Setup ffmpeg log callback in dcpomatic_setup() instead of in FFmpeg.
Diffstat (limited to 'src/lib/ffmpeg.cc')
-rw-r--r--src/lib/ffmpeg.cc21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index 39abfe2b8..4b8d7b8ab 100644
--- a/src/lib/ffmpeg.cc
+++ b/src/lib/ffmpeg.cc
@@ -97,29 +97,8 @@ avio_seek_wrapper (void* data, int64_t offset, int whence)
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);
-
_file_group.set_paths (_ffmpeg_content->paths ());
_avio_buffer = static_cast<uint8_t*> (wrapped_av_malloc(_avio_buffer_size));
_avio_context = avio_alloc_context (_avio_buffer, _avio_buffer_size, 0, this, avio_read_wrapper, 0, avio_seek_wrapper);