aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/internal.h
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-01-12 21:31:11 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-01-14 17:23:57 +0100
commitc4ba5198ea48f8f648d85a853ea46e29001c12c8 (patch)
treeb2cada03e1941b6241bcffdf24a6296c1450da7f /libavcodec/internal.h
parent45c39e566fe6d263e6ce0268b4629e5de3aa4d0c (diff)
downloadffmpeg-c4ba5198ea48f8f648d85a853ea46e29001c12c8.tar.gz
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>
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r--libavcodec/internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 068b34bbaa..e6270f81bf 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -96,6 +96,11 @@ unsigned int avpriv_toupper4(unsigned int x);
*/
void ff_init_buffer_info(AVCodecContext *s, AVFrame *pic);
+/**
+ * Remove and free all side data from packet.
+ */
+void ff_packet_free_side_data(AVPacket *pkt);
+
int avpriv_lock_avformat(void);
int avpriv_unlock_avformat(void);