mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12: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();
|
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);
|
std::unique_ptr<AVPacket, decltype([](AVPacket* p){av_packet_unref(p);})> packet_(packet);
|
||||||
|
|
||||||
// Iterate through frames
|
// Iterate through frames
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue