You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-20 14:45:44 +00:00
WebM: Fix crash when there is no audio stream
Sync with libsimplewebm-git: 05cfdc2
This commit is contained in:
1
thirdparty/README.md
vendored
1
thirdparty/README.md
vendored
@@ -98,6 +98,7 @@ Files extracted from upstream source:
|
|||||||
## libsimplewebm
|
## libsimplewebm
|
||||||
|
|
||||||
- Upstream: https://github.com/zaps166/libsimplewebm
|
- Upstream: https://github.com/zaps166/libsimplewebm
|
||||||
|
- Version: 05cfdc2 (git)
|
||||||
- License: MIT, BSD-3-Clause
|
- License: MIT, BSD-3-Clause
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,16 +43,17 @@ struct VorbisDecoder
|
|||||||
|
|
||||||
OpusVorbisDecoder::OpusVorbisDecoder(const WebMDemuxer &demuxer) :
|
OpusVorbisDecoder::OpusVorbisDecoder(const WebMDemuxer &demuxer) :
|
||||||
m_vorbis(NULL), m_opus(NULL),
|
m_vorbis(NULL), m_opus(NULL),
|
||||||
m_numSamples(0),
|
m_numSamples(0)
|
||||||
m_channels(demuxer.getChannels())
|
|
||||||
{
|
{
|
||||||
switch (demuxer.getAudioCodec())
|
switch (demuxer.getAudioCodec())
|
||||||
{
|
{
|
||||||
case WebMDemuxer::AUDIO_VORBIS:
|
case WebMDemuxer::AUDIO_VORBIS:
|
||||||
|
m_channels = demuxer.getChannels();
|
||||||
if (openVorbis(demuxer))
|
if (openVorbis(demuxer))
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case WebMDemuxer::AUDIO_OPUS:
|
case WebMDemuxer::AUDIO_OPUS:
|
||||||
|
m_channels = demuxer.getChannels();
|
||||||
if (openOpus(demuxer))
|
if (openOpus(demuxer))
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user