Mercurial > libavcodec.hg
diff utils.c @ 4558:4d1b45b20f8c libavcodec
simplify release_buffer using FFSWAP
author | aurel |
---|---|
date | Wed, 21 Feb 2007 23:46:25 +0000 |
parents | c31d78661cf2 |
children | 22c4464c8049 |
line wrap: on
line diff
--- 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;