mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fix deprecation warnings when building with FFmpeg 4.2.
This commit is contained in:
@@ -253,8 +253,9 @@ void Instance::Inner::start(Fn<void(Update)> updated, Fn<void()> error) {
|
||||
d->ioContext = avio_alloc_context(d->ioBuffer, FFmpeg::kAVBlockSize, 1, static_cast<void*>(d.get()), &Private::_read_data, &Private::_write_data, &Private::_seek_data);
|
||||
int res = 0;
|
||||
char err[AV_ERROR_MAX_STRING_SIZE] = { 0 };
|
||||
AVOutputFormat *fmt = 0;
|
||||
while ((fmt = av_oformat_next(fmt))) {
|
||||
const AVOutputFormat *fmt = nullptr;
|
||||
void *i = nullptr;
|
||||
while ((fmt = av_muxer_iterate(&i))) {
|
||||
if (fmt->name == qstr("opus")) {
|
||||
break;
|
||||
}
|
||||
@@ -265,7 +266,7 @@ void Instance::Inner::start(Fn<void(Update)> updated, Fn<void()> error) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((res = avformat_alloc_output_context2(&d->fmtContext, fmt, 0, 0)) < 0) {
|
||||
if ((res = avformat_alloc_output_context2(&d->fmtContext, (AVOutputFormat*)fmt, 0, 0)) < 0) {
|
||||
LOG(("Audio Error: Unable to avformat_alloc_output_context2 for capture, error %1, %2").arg(res).arg(av_make_error_string(err, sizeof(err), res)));
|
||||
fail();
|
||||
return;
|
||||
|
Reference in New Issue
Block a user