summaryrefslogtreecommitdiff
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-04-10 07:01:55 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-04-10 07:01:55 +0000
commit15861962a7a9e64fbe75f5cc0dc7d1c032db8dd5 (patch)
treec2a8fb920ce91b8e7d0a64def8c7b947e88c47ac /libavcodec/h264.h
parentc81185a18333b28439476fdc00979225158c8755 (diff)
Add a ff_h264_free_context function and call it from the H.264 parser.
This ensures that the parser will no longer leak memory for all SPS/PPS it encounters. Originally committed as revision 18406 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index fc9cef5d36..1f151af2cb 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -569,4 +569,9 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_l
*/
int ff_h264_decode_rbsp_trailing(H264Context *h, const uint8_t *src);
+/**
+ * frees any data that may have been allocated in the H264 context like SPS, PPS etc.
+ */
+av_cold ff_h264_free_context(H264Context *h);
+
#endif /* AVCODEC_H264_H */