mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 12:05:23 +00:00
audio_decoder: check for failed av_packet_alloc
This commit is contained in:
parent
7aad4f4253
commit
45c89030ac
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue