Simplify: reget_buffer behaves exactly like get_buffer if the buffer was
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Thu, 10 Sep 2009 12:23:45 +0000 (12:23 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Thu, 10 Sep 2009 12:23:45 +0000 (12:23 +0000)
previously released, so no extra condition is necessary.

Originally committed as revision 19808 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/nuv.c

index 4f049ba..dfc26e4 100644 (file)
@@ -202,7 +202,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     c->pic.reference = 3;
     c->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_READABLE |
                           FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
     c->pic.reference = 3;
     c->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_READABLE |
                           FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
-    result = keyframe ? avctx->get_buffer(avctx, &c->pic) : avctx->reget_buffer(avctx, &c->pic);
+    result = avctx->reget_buffer(avctx, &c->pic);
     if (result < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return -1;
     if (result < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return -1;