Give a better error. v2.15.80
authorCarl Hetherington <cth@carlh.net>
Mon, 15 Jun 2020 22:21:28 +0000 (00:21 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 15 Jun 2020 22:21:28 +0000 (00:21 +0200)
src/lib/ffmpeg_file_encoder.cc

index e9809008098536ee6591904e2047b378683d22d1..44ef3f0726d6be3d5b71e0046b1389e8f4e7641d 100644 (file)
@@ -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;