[FFmpeg-devel] [PATCH 18/19] loco: fix return value.

Nicolas George nicolas.george at normalesup.org
Sun Jul 29 15:57:36 CEST 2012


The return value was the number of bytes left,
it is supposed to be the number of bytes used.

Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 libavcodec/loco.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index fb33641..d604bf9 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -233,7 +233,7 @@ stop:
     *data_size = sizeof(AVFrame);
     *(AVFrame*)data = l->pic;
 
-    return buf_size < 0 ? -1 : buf_size;
+    return buf_size < 0 ? -1 : avpkt->size - buf_size;
 }
 
 static av_cold int decode_init(AVCodecContext *avctx){
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list