Mercurial > libavcodec.hg
comparison utils.c @ 10398:11b685acd280 libavcodec
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.
| author | reimar |
|---|---|
| date | Tue, 13 Oct 2009 20:48:51 +0000 |
| parents | 98501365c3aa |
| children | bdf4a9ca162a |
comparison
equal
deleted
inserted
replaced
| 10397:d7ed9dcc78e3 | 10398:11b685acd280 |
|---|---|
| 944 void avcodec_default_free_buffers(AVCodecContext *s){ | 944 void avcodec_default_free_buffers(AVCodecContext *s){ |
| 945 int i, j; | 945 int i, j; |
| 946 | 946 |
| 947 if(s->internal_buffer==NULL) return; | 947 if(s->internal_buffer==NULL) return; |
| 948 | 948 |
| 949 if (s->internal_buffer_count) | |
| 950 av_log(s, AV_LOG_WARNING, "Found %i unreleased buffers!\n", s->internal_buffer_count); | |
| 949 for(i=0; i<INTERNAL_BUFFER_SIZE; i++){ | 951 for(i=0; i<INTERNAL_BUFFER_SIZE; i++){ |
| 950 InternalBuffer *buf= &((InternalBuffer*)s->internal_buffer)[i]; | 952 InternalBuffer *buf= &((InternalBuffer*)s->internal_buffer)[i]; |
| 951 for(j=0; j<4; j++){ | 953 for(j=0; j<4; j++){ |
| 952 av_freep(&buf->base[j]); | 954 av_freep(&buf->base[j]); |
| 953 buf->data[j]= NULL; | 955 buf->data[j]= NULL; |
