Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 942770 | Differences between
and this patch

Collapse All | Expand All

(-)a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp (-1 / +2 lines)
Lines 564-570 SwresamplePointer MakeSwresamplePointer( Link Here
564
	}
564
	}
565
#else // DA_FFMPEG_NEW_CHANNEL_LAYOUT
565
#else // DA_FFMPEG_NEW_CHANNEL_LAYOUT
566
	auto result = swr_alloc_set_opts(
566
	auto result = swr_alloc_set_opts(
567
		existing ? existing.get() : nullptr,
567
		existing ? existing->get() : nullptr,
568
		dstLayout,
568
		dstLayout,
569
		dstFormat,
569
		dstFormat,
570
		dstRate,
570
		dstRate,
Lines 576-581 SwresamplePointer MakeSwresamplePointer( Link Here
576
	if (!result) {
576
	if (!result) {
577
		LogError(u"swr_alloc_set_opts"_q);
577
		LogError(u"swr_alloc_set_opts"_q);
578
	}
578
	}
579
	auto
579
#endif // DA_FFMPEG_NEW_CHANNEL_LAYOUT
580
#endif // DA_FFMPEG_NEW_CHANNEL_LAYOUT
580
581
581
	error = AvErrorWrap(swr_init(result));
582
	error = AvErrorWrap(swr_init(result));
(-)a/Telegram/SourceFiles/media/audio/media_audio_local_cache.cpp (-2 / +8 lines)
Lines 44-50 constexpr auto kFrameSize = 4096; Link Here
44
		return {};
44
		return {};
45
	}
45
	}
46
46
47
48
#if DA_FFMPEG_NEW_CHANNEL_LAYOUT
47
	auto inCodec = (const AVCodec*)nullptr;
49
	auto inCodec = (const AVCodec*)nullptr;
50
#else
51
	auto inCodec = (AVCodec*)nullptr;
52
#endif
53
48
	const auto streamId = av_find_best_stream(
54
	const auto streamId = av_find_best_stream(
49
		input.get(),
55
		input.get(),
50
		AVMEDIA_TYPE_AUDIO,
56
		AVMEDIA_TYPE_AUDIO,
Lines 152-161 constexpr auto kFrameSize = 4096; Link Here
152
		inCodecContext->sample_rate,
158
		inCodecContext->sample_rate,
153
		&outCodecContext->ch_layout,
159
		&outCodecContext->ch_layout,
154
#else // DA_FFMPEG_NEW_CHANNEL_LAYOUT
160
#else // DA_FFMPEG_NEW_CHANNEL_LAYOUT
155
		&inCodecContext->channel_layout,
161
		inCodecContext->channel_layout,
156
		inCodecContext->sample_fmt,
162
		inCodecContext->sample_fmt,
157
		inCodecContext->sample_rate,
163
		inCodecContext->sample_rate,
158
		&outCodecContext->channel_layout,
164
		outCodecContext->channel_layout,
159
#endif // DA_FFMPEG_NEW_CHANNEL_LAYOUT
165
#endif // DA_FFMPEG_NEW_CHANNEL_LAYOUT
160
		outCodecContext->sample_fmt,
166
		outCodecContext->sample_fmt,
161
		outCodecContext->sample_rate);
167
		outCodecContext->sample_rate);
(-)a/Telegram/SourceFiles/ui/controls/round_video_recorder.cpp (-2 / +2 lines)
Lines 341-350 bool RoundVideoRecorder::Private::initAudio() { Link Here
341
		&_swrContext);
341
		&_swrContext);
342
#else // DA_FFMPEG_NEW_CHANNEL_LAYOUT
342
#else // DA_FFMPEG_NEW_CHANNEL_LAYOUT
343
	_swrContext = MakeSwresamplePointer(
343
	_swrContext = MakeSwresamplePointer(
344
		&_audioCodec->channel_layout,
344
		_audioCodec->channel_layout,
345
		AV_SAMPLE_FMT_S16,
345
		AV_SAMPLE_FMT_S16,
346
		_audioCodec->sample_rate,
346
		_audioCodec->sample_rate,
347
		&_audioCodec->channel_layout,
347
		_audioCodec->channel_layout,
348
		_audioCodec->sample_fmt,
348
		_audioCodec->sample_fmt,
349
		_audioCodec->sample_rate,
349
		_audioCodec->sample_rate,
350
		&_swrContext);
350
		&_swrContext);

Return to bug 942770