mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
decoder: set channel layout
Change-Id: I9aadd0696d7ad2e467ffe19841bc9e919e08777a
This commit is contained in:

committed by
Adrien Béraud

parent
e3022741bd
commit
05d3813db6
@ -338,6 +338,10 @@ MediaDecoder::decode(const AudioFrame& decodedFrame)
|
||||
if (frameFinished) {
|
||||
av_packet_unref(&inpacket);
|
||||
|
||||
// channel layout is needed if frame will be resampled
|
||||
if (!frame->channel_layout)
|
||||
frame->channel_layout = av_get_default_channel_layout(frame->channels);
|
||||
|
||||
auto packetTimestamp = frame->pts;
|
||||
// NOTE don't use clock to rescale audio pts, it may create artifacts
|
||||
frame->pts = av_rescale_q_rnd(frame->pts, avStream_->time_base, decoderCtx_->time_base,
|
||||
|
Reference in New Issue
Block a user