Skip to content

Commit ede1718

Browse files
authored
server : ffmpeg overwrite leftover temp file (ggerganov#2431)
* Remove possible leftover ffmpeg temp file from a previous failed conversion * Revert "Remove possible leftover ffmpeg temp file from a previous failed conversion" This reverts commit 0079740. * Flag to force ffmpeg to overwrite output file if it exists
1 parent 2ef717b commit ede1718

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void check_ffmpeg_availibility() {
219219
bool convert_to_wav(const std::string & temp_filename, std::string & error_resp) {
220220
std::ostringstream cmd_stream;
221221
std::string converted_filename_temp = temp_filename + "_temp.wav";
222-
cmd_stream << "ffmpeg -i \"" << temp_filename << "\" -ar 16000 -ac 1 -c:a pcm_s16le \"" << converted_filename_temp << "\" 2>&1";
222+
cmd_stream << "ffmpeg -i \"" << temp_filename << "\" -y -ar 16000 -ac 1 -c:a pcm_s16le \"" << converted_filename_temp << "\" 2>&1";
223223
std::string cmd = cmd_stream.str();
224224

225225
int status = std::system(cmd.c_str());

0 commit comments

Comments
 (0)