Fix output file for export.
authorCarl Hetherington <cth@carlh.net>
Tue, 9 May 2017 23:12:43 +0000 (00:12 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 9 May 2017 23:12:43 +0000 (00:12 +0100)
src/lib/ffmpeg_transcoder.cc

index 5f6484064dd0b06b93e6611062e044eb077ebe77..510966f0c16422a81cd6ed705c73d620e54c92d3 100644 (file)
@@ -79,7 +79,6 @@ FFmpegTranscoder::go ()
        _codec_context->pix_fmt = _pixel_format;
        _codec_context->flags |= CODEC_FLAG_QSCALE | CODEC_FLAG_GLOBAL_HEADER;
 
-       boost::filesystem::path filename = _film->file(_film->isdcf_name(true) + ".mov");
        avformat_alloc_output_context2 (&_format_context, 0, 0, _output.string().c_str());
        if (!_format_context) {
                throw runtime_error ("could not allocate FFmpeg format context");
@@ -102,7 +101,7 @@ FFmpegTranscoder::go ()
                throw runtime_error ("could not open FFmpeg codec");
        }
 
-       if (avio_open (&_format_context->pb, filename.c_str(), AVIO_FLAG_WRITE) < 0) {
+       if (avio_open (&_format_context->pb, _output.c_str(), AVIO_FLAG_WRITE) < 0) {
                throw runtime_error ("could not open FFmpeg output file");
        }