ultimotion: use reget_buffer() in ulti_decode_frame()
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Tue, 26 Apr 2011 09:45:40 +0000 (11:45 +0200)
committerRonald S. Bultje <rsbultje@gmail.com>
Wed, 27 Apr 2011 14:42:42 +0000 (07:42 -0700)
Decoder relies on previous frame data, so use reget_buffer().

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavcodec/ulti.c

index 31b1c4a..9a73c62 100644 (file)
@@ -224,13 +224,10 @@ static int ulti_decode_frame(AVCodecContext *avctx,
     int skip;
     int tmp;
 
-    if(s->frame.data[0])
-        avctx->release_buffer(avctx, &s->frame);
-
     s->frame.reference = 1;
     s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
-    if(avctx->get_buffer(avctx, &s->frame) < 0) {
-        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
+    if (avctx->reget_buffer(avctx, &s->frame) < 0) {
+        av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
         return -1;
     }