summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-12-02 08:58:08 +0100
committerGitHub <noreply@github.com>2016-12-02 08:58:08 +0100
commit4d8bed33215c005f6aa6fcb34d5d343ee3bee23e (patch)
treec133bb4afc2467c57acff31fc42555b84d53008d
parent752f630f4e5bf17019de66cf2b0f33cf419ab525 (diff)
parent79f09b3f15c53f8d661ed525d95d64bfd6f73568 (diff)
Merge pull request #7221 from zaps166/webm_crashfix
WebM: Fix crash when there is no audio stream
-rw-r--r--thirdparty/README.md1
-rw-r--r--thirdparty/libsimplewebm/OpusVorbisDecoder.cpp5
2 files changed, 4 insertions, 2 deletions
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 3adbbea59b..4b8e6b01ad 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -98,6 +98,7 @@ Files extracted from upstream source:
## libsimplewebm
- Upstream: https://github.com/zaps166/libsimplewebm
+- Version: 05cfdc2 (git)
- License: MIT, BSD-3-Clause
diff --git a/thirdparty/libsimplewebm/OpusVorbisDecoder.cpp b/thirdparty/libsimplewebm/OpusVorbisDecoder.cpp
index d7869f599b..06447aca57 100644
--- a/thirdparty/libsimplewebm/OpusVorbisDecoder.cpp
+++ b/thirdparty/libsimplewebm/OpusVorbisDecoder.cpp
@@ -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;