Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
[Deocde] Fix Memory leak in simple_5_transcode app (#2956)
Browse files Browse the repository at this point in the history
This is a PSIRT issue caused by the memory leak from app.
  • Loading branch information
pengxin99 authored Aug 12, 2022
1 parent 486dffc commit 03dd2cc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tutorials/simple_5_transcode/src/simple_transcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,15 @@ int main(int argc, char** argv)
if (MFX_ERR_NONE < sts && syncpD)
sts = MFX_ERR_NONE;

// skip the buffer in mfxBS when MFX_ERR_INCOMPATIBLE_VIDEO_PARAM
if (MFX_ERR_INCOMPATIBLE_VIDEO_PARAM == sts)
{
mfxBS.DataOffset += mfxBS.DataLength;
mfxBS.DataLength = 0;
sts = MFX_ERR_MORE_DATA;
continue;
}

if (MFX_ERR_NONE == sts) {
for (;;) {
// Encode a frame asychronously (returns immediately)
Expand Down

0 comments on commit 03dd2cc

Please sign in to comment.