You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
WebM: Fix crash when there is no audio stream
Sync with libsimplewebm-git: 05cfdc2
This commit is contained in:
@@ -43,16 +43,17 @@ struct VorbisDecoder
|
||||
|
||||
OpusVorbisDecoder::OpusVorbisDecoder(const WebMDemuxer &demuxer) :
|
||||
m_vorbis(NULL), m_opus(NULL),
|
||||
m_numSamples(0),
|
||||
m_channels(demuxer.getChannels())
|
||||
m_numSamples(0)
|
||||
{
|
||||
switch (demuxer.getAudioCodec())
|
||||
{
|
||||
case WebMDemuxer::AUDIO_VORBIS:
|
||||
m_channels = demuxer.getChannels();
|
||||
if (openVorbis(demuxer))
|
||||
return;
|
||||
break;
|
||||
case WebMDemuxer::AUDIO_OPUS:
|
||||
m_channels = demuxer.getChannels();
|
||||
if (openOpus(demuxer))
|
||||
return;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user