mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +09:00
Perform null check earlier in OggCodecState.cpp
This commit is contained in:
parent
1bc04e8910
commit
edf010898f
1 changed files with 4 additions and 3 deletions
|
|
@ -1229,12 +1229,13 @@ already_AddRefed<MediaRawData>
|
||||||
OpusState::PacketOutAsMediaRawData()
|
OpusState::PacketOutAsMediaRawData()
|
||||||
{
|
{
|
||||||
ogg_packet* packet = PacketPeek();
|
ogg_packet* packet = PacketPeek();
|
||||||
uint32_t frames = 0;
|
|
||||||
const int64_t endFrame = packet->granulepos;
|
|
||||||
|
|
||||||
if (!packet) {
|
if (!packet) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t frames = 0;
|
||||||
|
const int64_t endFrame = packet->granulepos;
|
||||||
|
|
||||||
if (packet->e_o_s) {
|
if (packet->e_o_s) {
|
||||||
frames = GetOpusDeltaGP(packet);
|
frames = GetOpusDeltaGP(packet);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue