diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-02-21 23:46:25 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-02-21 23:46:25 +0000 |
commit | 6829ac8de46b889cece770b36a47ebd1c68a6aab (patch) | |
tree | 494ae954d08d8a042c481735655edb9c0a41e4ae /libavcodec/utils.c | |
parent | 3dc09ed18883315fc50b2c91897f7d6ad087bcfd (diff) | |
download | ffmpeg-6829ac8de46b889cece770b36a47ebd1c68a6aab.tar.gz |
simplify release_buffer using FFSWAP
Originally committed as revision 8057 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 5247777296..aeb9b0ab52 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -333,7 +333,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ 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 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){ 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; |