diff options
author | David Conrad <lessen42@gmail.com> | 2010-03-09 00:29:19 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2010-03-09 00:29:19 +0000 |
commit | 0c9afacbf5f89cbc56a8cf439db7567bbcb73c21 (patch) | |
tree | a8680a20e9d0d2c178153b353927540f892090cd /libavcodec/vp3.c | |
parent | e72d2d12216844a692d7211f97abfbc1867fb01d (diff) | |
download | ffmpeg-0c9afacbf5f89cbc56a8cf439db7567bbcb73c21.tar.gz |
vp3: use FF_BUFFER_TYPE_COPY
Originally committed as revision 22359 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r-- | libavcodec/vp3.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 2963686ea3..b874ee7f72 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1889,8 +1889,7 @@ static int vp3_decode_frame(AVCodecContext *avctx, /* release the last frame, if it is allocated and if it is not the * golden frame */ - if ((s->last_frame.data[0]) && - (s->last_frame.data[0] != s->golden_frame.data[0])) + if (s->last_frame.data[0] && s->last_frame.type != FF_BUFFER_TYPE_COPY) avctx->release_buffer(avctx, &s->last_frame); /* shuffle frames (last = current) */ @@ -1900,6 +1899,7 @@ static int vp3_decode_frame(AVCodecContext *avctx, if (s->golden_frame.data[0]) avctx->release_buffer(avctx, &s->golden_frame); s->golden_frame = s->current_frame; + s->last_frame.type = FF_BUFFER_TYPE_COPY; } s->current_frame.data[0]= NULL; /* ensure that we catch any access to this released frame */ @@ -1941,9 +1941,9 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx) free_vlc(&s->motion_vector_vlc); /* release all frames */ - if (s->golden_frame.data[0] && s->golden_frame.data[0] != s->last_frame.data[0]) + if (s->golden_frame.data[0]) avctx->release_buffer(avctx, &s->golden_frame); - if (s->last_frame.data[0]) + if (s->last_frame.data[0] && s->last_frame.type != FF_BUFFER_TYPE_COPY) avctx->release_buffer(avctx, &s->last_frame); /* no need to release the current_frame since it will always be pointing * to the same frame as either the golden or last frame */ |