[FFmpeg-cvslog] apedec: set s->currentframeblocks after validating nblocks

Justin Ruggles git at videolan.org
Sat Oct 29 02:31:38 CEST 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Oct 11 13:25:27 2011 -0400| [52d4fb2a3dd7aea62a06cf8358dc41fdb4913f6f] | committer: Justin Ruggles

apedec: set s->currentframeblocks after validating nblocks

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

 libavcodec/apedec.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index f6ec470..9274b23 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -841,13 +841,12 @@ static int ape_decode_frame(AVCodecContext *avctx,
         }
         s->ptr += n;
 
-        s->currentframeblocks = nblocks;
         buf += 4;
         if (!nblocks || nblocks > INT_MAX) {
             av_log(avctx, AV_LOG_ERROR, "Invalid sample count: %u.\n", nblocks);
             return AVERROR_INVALIDDATA;
         }
-        s->samples = nblocks;
+        s->currentframeblocks = s->samples = nblocks;
 
         memset(s->decoded0,  0, sizeof(s->decoded0));
         memset(s->decoded1,  0, sizeof(s->decoded1));



More information about the ffmpeg-cvslog mailing list