summaryrefslogtreecommitdiffstats
path: root/dom/media/ogg
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-05-25 21:53:19 +0200
committerGitHub <noreply@github.com>2018-05-25 21:53:19 +0200
commitedccc615f9435d658febac9be2299542349e2b08 (patch)
treeca3fcaa2a72700b85221b2fe75bb7d46d5d424ce /dom/media/ogg
parentb43a5fbedae602d0025ffdda8929e5bee9e2ca0b (diff)
parentf2d541d3ea44b56d3c4ce47fe7b326e58abc786f (diff)
downloadUXP-edccc615f9435d658febac9be2299542349e2b08.tar
UXP-edccc615f9435d658febac9be2299542349e2b08.tar.gz
UXP-edccc615f9435d658febac9be2299542349e2b08.tar.lz
UXP-edccc615f9435d658febac9be2299542349e2b08.tar.xz
UXP-edccc615f9435d658febac9be2299542349e2b08.zip
Merge pull request #385 from trav90/media-work
Fix null checks in dom/media
Diffstat (limited to 'dom/media/ogg')
-rw-r--r--dom/media/ogg/OggCodecState.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/dom/media/ogg/OggCodecState.cpp b/dom/media/ogg/OggCodecState.cpp
index e7e1ca4a3..d03508411 100644
--- a/dom/media/ogg/OggCodecState.cpp
+++ b/dom/media/ogg/OggCodecState.cpp
@@ -1229,12 +1229,13 @@ already_AddRefed<MediaRawData>
OpusState::PacketOutAsMediaRawData()
{
ogg_packet* packet = PacketPeek();
- uint32_t frames = 0;
- const int64_t endFrame = packet->granulepos;
-
if (!packet) {
return nullptr;
}
+
+ uint32_t frames = 0;
+ const int64_t endFrame = packet->granulepos;
+
if (packet->e_o_s) {
frames = GetOpusDeltaGP(packet);
}