Skip to content

Commit

Permalink
Ensure the channel layout is never invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevcairiel committed Aug 23, 2022
1 parent 37b5476 commit 13b83b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions decoder/LAVAudio/PostProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ HRESULT ExtendedChannelMapping(BufferDetails *pcm, const unsigned uOutChannels,
// Apply changes to buffer
delete pcm->bBuffer;
pcm->bBuffer = out;
av_channel_layout_uninit(&pcm->layout);
pcm->layout.order = AV_CHANNEL_ORDER_UNSPEC;
pcm->layout.nb_channels = uOutChannels;

return S_OK;
}
Expand Down

0 comments on commit 13b83b5

Please sign in to comment.