summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-05-25 10:33:40 -0500
committertrav90 <travawine@palemoon.org>2018-05-25 10:33:40 -0500
commit43470083d171c9f11cbbda954920ad8eafdcaaf3 (patch)
tree76d6c8aaf1c645569086ab5ea25f5592ddf40090 /dom
parentb43a5fbedae602d0025ffdda8929e5bee9e2ca0b (diff)
downloadUXP-43470083d171c9f11cbbda954920ad8eafdcaaf3.tar
UXP-43470083d171c9f11cbbda954920ad8eafdcaaf3.tar.gz
UXP-43470083d171c9f11cbbda954920ad8eafdcaaf3.tar.lz
UXP-43470083d171c9f11cbbda954920ad8eafdcaaf3.tar.xz
UXP-43470083d171c9f11cbbda954920ad8eafdcaaf3.zip
Perform null check earlier in OggCodecState.cpp
Diffstat (limited to 'dom')
-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);
}