summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-13 20:48:51 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-13 20:48:51 +0000
commitea09f691943091bf831befcf9f18288ccdcb6acf (patch)
treeabceebe4fc48a59deb48263a4011e19e327b9d94 /libavcodec
parent4a49ab77c6bb2348992e1e70b14f2d1efaf7ddbb (diff)
Print a warning message when avcodec_default_free_buffers finds unreleased
buffers, this hopefully should help detect codecs that do not release all buffers e.g. in the decode_end function. Originally committed as revision 20230 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 1077fd7fc7..548f9474a4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -946,6 +946,8 @@ void avcodec_default_free_buffers(AVCodecContext *s){
if(s->internal_buffer==NULL) return;
+ if (s->internal_buffer_count)
+ av_log(s, AV_LOG_WARNING, "Found %i unreleased buffers!\n", s->internal_buffer_count);
for(i=0; i<INTERNAL_BUFFER_SIZE; i++){
InternalBuffer *buf= &((InternalBuffer*)s->internal_buffer)[i];
for(j=0; j<4; j++){