# HG changeset patch # User aurel # Date 1172101585 0 # Node ID 4d1b45b20f8cd70506af0258b1d342c767c7b780 # Parent 6d4ac79304da83e0855b077e8966817344530475 simplify release_buffer using FFSWAP diff -r 6d4ac79304da -r 4d1b45b20f8c utils.c --- a/utils.c Wed Feb 21 23:32:13 2007 +0000 +++ b/utils.c Wed Feb 21 23:46:25 2007 +0000 @@ -333,7 +333,7 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){ int i; - InternalBuffer *buf, *last, temp; + InternalBuffer *buf, *last; assert(pic->type==FF_BUFFER_TYPE_INTERNAL); assert(s->internal_buffer_count); @@ -348,9 +348,7 @@ s->internal_buffer_count--; last = &((InternalBuffer*)s->internal_buffer)[s->internal_buffer_count]; - temp= *buf; - *buf= *last; - *last= temp; + FFSWAP(InternalBuffer, *buf, *last); for(i=0; i<3; i++){ pic->data[i]=NULL;