From 012f930855ec647b1723cd845c6e5fa80936a0fb Mon Sep 17 00:00:00 2001
From: Aurelien Jacobs <aurel@gnuage.org>
Date: Tue, 7 Apr 2009 18:24:47 +0000
Subject: [PATCH] fix vp5/vp6 decoding by using new prototype for decode
 function

Originally committed as revision 18352 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/vp56.c | 7 ++++---
 libavcodec/vp56.h | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index ad11b5289a1..a5d6308813b 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -495,11 +495,12 @@ static int vp56_size_changed(AVCodecContext *avctx)
 }
 
 int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-                      const uint8_t *buf, int buf_size)
+                      AVPacket *avpkt)
 {
+    const uint8_t *buf = avpkt->data;
     VP56Context *s = avctx->priv_data;
     AVFrame *const p = s->framep[VP56_FRAME_CURRENT];
-    int remaining_buf_size = buf_size;
+    int remaining_buf_size = avpkt->size;
     int is_alpha, av_uninit(alpha_offset);
 
     if (s->has_alpha) {
@@ -641,7 +642,7 @@ int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     *(AVFrame*)data = *p;
     *data_size = sizeof(AVFrame);
 
-    return buf_size;
+    return avpkt->size;
 }
 
 av_cold void vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h
index 3a9019460c8..904c57e82cf 100644
--- a/libavcodec/vp56.h
+++ b/libavcodec/vp56.h
@@ -172,7 +172,7 @@ void vp56_init(AVCodecContext *avctx, int flip, int has_alpha);
 int vp56_free(AVCodecContext *avctx);
 void vp56_init_dequant(VP56Context *s, int quantizer);
 int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-                      const uint8_t *buf, int buf_size);
+                      AVPacket *avpkt);
 
 
 /**
-- 
GitLab