diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-03-22 22:36:57 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-03-22 22:36:57 +0100 |
commit | d375c1040032ed42f84b7d4ea53baad4a661b628 (patch) | |
tree | f5bb63830cbc49106376a418c292c452f3b0728d /libavcodec/utils.c | |
parent | 038566a5edc73205120f30d41233a9911a42da44 (diff) | |
download | ffmpeg-d375c1040032ed42f84b7d4ea53baad4a661b628.tar.gz |
Fake-Merge remote-tracking branch 'ffmpeg-mt/master'
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 40d689e1f6..2c737d9625 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -366,6 +366,7 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){ assert(pic->type==FF_BUFFER_TYPE_INTERNAL); assert(s->internal_buffer_count); + if(s->internal_buffer){ buf = NULL; /* avoids warning */ for(i=0; i<s->internal_buffer_count; i++){ //just 3-5 checks so is not worth to optimize buf= &((InternalBuffer*)s->internal_buffer)[i]; @@ -377,6 +378,7 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){ last = &((InternalBuffer*)s->internal_buffer)[s->internal_buffer_count]; FFSWAP(InternalBuffer, *buf, *last); + } for(i=0; i<4; i++){ pic->data[i]=NULL; @@ -572,6 +574,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec) goto free_and_end; } } + ret=0; end: entangled_thread_counter--; @@ -1298,9 +1301,9 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)) unsigned int ff_toupper4(unsigned int x) { return toupper( x &0xFF) - + (toupper((x>>8 )&0xFF)<<8 ) - + (toupper((x>>16)&0xFF)<<16) - + (toupper((x>>24)&0xFF)<<24); + + (toupper((x>>8 )&0xFF)<<8 ) + + (toupper((x>>16)&0xFF)<<16) + + (toupper((x>>24)&0xFF)<<24); } #if !HAVE_PTHREADS |