History

apv_decode: Fix memory leak on decode error

Mark Thompson committed 1 year ago

Commit 5acd2141 parent 135acc81 file · +4 −3Browse files

Unified · Split

libavcodec/apv_decode.c+4−3
@@ -385,7 +385,7 @@ static int apv_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 384 unmodified lines
385 case APV_PBU_PRIMARY_FRAME:385 case APV_PBU_PRIMARY_FRAME:
386 err = apv_decode(avctx, frame, pbu->content);386 err = apv_decode(avctx, frame, pbu->content);
387 if (err < 0)387 if (err < 0)
388 return err;388 goto fail;
389 *got_frame = 1;389 *got_frame = 1;
390 break;390 break;
391 case APV_PBU_METADATA:391 case APV_PBU_METADATA:
@@ -419,9 +419,10 @@ static int apv_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 27 unmodified lines
419 }419 }
420 }420 }
421 421
422 err = packet->size;
423fail:
422 ff_cbs_fragment_reset(au);424 ff_cbs_fragment_reset(au);
423 425 return err;
424 return packet->size;
425}426}
426 427
427const FFCodec ff_apv_decoder = {428const FFCodec ff_apv_decoder = {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t