[Ffmpeg-cvslog] r8057 - trunk/libavcodec/utils.c
aurel
subversion
Thu Feb 22 00:46:26 CET 2007
Author: aurel
Date: Thu Feb 22 00:46:25 2007
New Revision: 8057
Modified:
trunk/libavcodec/utils.c
Log:
simplify release_buffer using FFSWAP
Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c (original)
+++ trunk/libavcodec/utils.c Thu Feb 22 00:46:25 2007
@@ -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;
More information about the ffmpeg-cvslog
mailing list