We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c788e3 commit 8d4cce5Copy full SHA for 8d4cce5
src/AvTranscoder/data/coded/CodedData.cpp
@@ -14,7 +14,12 @@ CodedData::CodedData()
14
CodedData::CodedData(const size_t dataSize)
15
: _avStream(NULL)
16
{
17
- av_new_packet(&_packet, dataSize);
+ const int err = av_new_packet(&_packet, dataSize);
18
+ if(err != 0)
19
+ {
20
+ LOG_ERROR("Unable to allocate the payload of a packet and initialize its fields with default values: " << getDescriptionFromErrorCode(err))
21
+ throw std::bad_alloc();
22
+ }
23
}
24
25
CodedData::CodedData(const AVPacket& avPacket)
0 commit comments