summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/adxdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c
index e59cc92..ec33e73 100644
--- a/libavcodec/adxdec.c
+++ b/libavcodec/adxdec.c
@@ -157,9 +157,11 @@ static int adx_decode_frame(AVCodecContext *avctx, void *data,
buf_size -= BLOCK_SIZE;
buf += BLOCK_SIZE;
}
- samples_offset += BLOCK_SAMPLES;
+ if (!c->eof)
+ samples_offset += BLOCK_SAMPLES;
}
+ frame->nb_samples = samples_offset;
*got_frame_ptr = 1;
return buf - avpkt->data;
OpenPOWER on IntegriCloud