Merge pull request #7221 from zaps166/webm_crashfix
WebM: Fix crash when there is no audio stream
This commit is contained in:
commit
4d8bed3321
2 changed files with 4 additions and 2 deletions
1
thirdparty/README.md
vendored
1
thirdparty/README.md
vendored
|
@ -98,6 +98,7 @@ Files extracted from upstream source:
|
|||
## libsimplewebm
|
||||
|
||||
- Upstream: https://github.com/zaps166/libsimplewebm
|
||||
- Version: 05cfdc2 (git)
|
||||
- License: MIT, BSD-3-Clause
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue