From d4478461a32c990acc0b05d950a5a2898a84f128 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Tue, 11 Jun 2013 13:38:07 +0200 Subject: [PATCH] AudioFileOgg: test for properly opened output file Do not pretend things gone right if output file could not be opened for some reason. Closes #539. --- src/core/audio/AudioFileOgg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/audio/AudioFileOgg.cpp b/src/core/audio/AudioFileOgg.cpp index 3ef2856e7..e0e4e9b03 100644 --- a/src/core/audio/AudioFileOgg.cpp +++ b/src/core/audio/AudioFileOgg.cpp @@ -5,7 +5,7 @@ * This file is based on encode.c from vorbis-tools-source, for more information * see below. * - * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2004-2013 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -49,7 +49,7 @@ AudioFileOgg::AudioFileOgg( const sample_rate_t _sample_rate, _nom_bitrate, _min_bitrate, _max_bitrate, _depth, _mixer ) { - m_ok = _success_ful = startEncoding(); + m_ok = _success_ful = outputFileOpened() && startEncoding(); }