[FFmpeg-cvslog] avcodec/amr*bdec: return only number of consumed bytes

Paul B Mahol git at videolan.org
Thu Sep 1 00:08:23 EEST 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Aug 31 18:36:04 2022 +0200| [319e8a49b5bcfa80fcb6f50f0dd78c6408c972ae] | committer: Paul B Mahol

avcodec/amr*bdec: return only number of consumed bytes

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=319e8a49b5bcfa80fcb6f50f0dd78c6408c972ae
---

 libavcodec/amrnbdec.c | 2 +-
 libavcodec/amrwbdec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
index dcf66c1dde..e07c01923e 100644
--- a/libavcodec/amrnbdec.c
+++ b/libavcodec/amrnbdec.c
@@ -1091,7 +1091,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, AVFrame *frame,
 
     *got_frame_ptr = 1;
 
-    return avpkt->size;
+    return buf - avpkt->data;
 }
 
 
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index f9a67c43b7..1e537e1a3b 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -1288,7 +1288,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, AVFrame *frame,
 
     *got_frame_ptr = 1;
 
-    return avpkt->size;
+    return buf - avpkt->data;
 }
 
 const FFCodec ff_amrwb_decoder = {



More information about the ffmpeg-cvslog mailing list