mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-04-28 13:55:14 -06:00
audio_decoder: check for failed av_packet_alloc
This commit is contained in:
parent
7aad4f4253
commit
45c89030ac
@ -545,6 +545,13 @@ namespace utils
|
||||
}
|
||||
|
||||
AVPacket* packet = av_packet_alloc();
|
||||
if (!packet)
|
||||
{
|
||||
media_log.error("audio_decoder: Error allocating the packet");
|
||||
has_error = true;
|
||||
return;
|
||||
}
|
||||
|
||||
std::unique_ptr<AVPacket, decltype([](AVPacket* p){av_packet_unref(p);})> packet_(packet);
|
||||
|
||||
// Iterate through frames
|
||||
|
||||
Loading…
Reference in New Issue
Block a user