Fix leaking of side data.
While we correctly "register" the side data when we split it, the application (in this case FFmpeg) might not update the AVPacket pool it uses to finally free the packet, thus causing a leak. This also makes the av_dup_packet unnecessary which could cause an even worse leak in this situation. Also change the code to not modify the user-provide AVPacket at all. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
parent
45c39e566f
commit
c4ba5198ea
4 changed files with 27 additions and 14 deletions
|
|
@ -4297,7 +4297,7 @@ int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
|
|||
*/
|
||||
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
|
||||
int *got_picture_ptr,
|
||||
AVPacket *avpkt);
|
||||
const AVPacket *avpkt);
|
||||
|
||||
/**
|
||||
* Decode a subtitle message.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue