Browse Source

avcodec/encode: free non-referenced packets' side data in the old encode API functions

Fixes memleaks introduced by a22c6a4796.
tags/n3.4
James Almer 8 years ago
parent
commit
712ee85816
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/encode.c

+ 2
- 0
libavcodec/encode.c View File

@@ -227,6 +227,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
ret = av_packet_ref(&tmp, avpkt);
if (ret < 0)
return ret;
av_packet_unref(avpkt);
*avpkt = tmp;
}
}
@@ -325,6 +326,7 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
ret = av_packet_ref(&tmp, avpkt);
if (ret < 0)
return ret;
av_packet_unref(avpkt);
*avpkt = tmp;
}
}


Loading…
Cancel
Save