From 30e262f486c8390b7c9a1a797471082f90adf61b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 16 Jun 2020 00:21:28 +0200 Subject: [PATCH] Give a better error. --- src/lib/ffmpeg_file_encoder.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/ffmpeg_file_encoder.cc b/src/lib/ffmpeg_file_encoder.cc index e98090080..44ef3f072 100644 --- a/src/lib/ffmpeg_file_encoder.cc +++ b/src/lib/ffmpeg_file_encoder.cc @@ -130,8 +130,9 @@ FFmpegFileEncoder::FFmpegFileEncoder ( throw runtime_error (String::compose ("could not open FFmpeg audio codec (%1)", buffer)); } - if (avio_open_boost (&_format_context->pb, _output, AVIO_FLAG_WRITE) < 0) { - throw runtime_error ("could not open FFmpeg output file"); + r = avio_open_boost (&_format_context->pb, _output, AVIO_FLAG_WRITE); + if (r < 0) { + throw runtime_error (String::compose("could not open FFmpeg output file %1 (%2)", _output.string(), r)); } AVDictionary* options = 0; -- 2.30.2