From fa501b18e4f4b5d05e8982957e774f49fb1274b9 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 14 Aug 2015 18:24:40 +0300 Subject: [PATCH] crashfix in sending audio files --- Telegram/SourceFiles/audio.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/audio.cpp b/Telegram/SourceFiles/audio.cpp index 407d3a1af..f9cc5c1a9 100644 --- a/Telegram/SourceFiles/audio.cpp +++ b/Telegram/SourceFiles/audio.cpp @@ -2221,7 +2221,9 @@ public: int res = 0; char err[AV_ERROR_MAX_STRING_SIZE] = { 0 }; if ((res = avformat_open_input(&fmtContext, 0, 0, 0)) < 0) { - DEBUG_LOG(("Audio Read Error: Unable to avformat_open_input for file '%1', data size '%2', error %3, %4").arg(fname).arg(data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res))); + ioBuffer = 0; + + DEBUG_LOG(("Audio Read Error: Unable to avformat_open_input for file '%1', data size '%2', error %3, %4").arg(fname).arg(data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res))); return false; } _opened = true;