[FFmpeg-cvslog] brstm: fix number of samples for the last block

James Almer git at videolan.org
Sun Dec 16 12:33:57 CET 2012


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Dec 15 21:15:04 2012 -0300| [7959c26fb04d744a98087a19b524d456faeb9e0f] | committer: Paul B Mahol

brstm: fix number of samples for the last block

Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavformat/brstm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/brstm.c b/libavformat/brstm.c
index 0a874d3..80f73ed 100644
--- a/libavformat/brstm.c
+++ b/libavformat/brstm.c
@@ -245,7 +245,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
     b->current_block++;
     if (b->current_block == b->block_count) {
         size    = b->last_block_used_bytes;
-        samples = size / 16 * 14;
+        samples = size / (8 * codec->channels) * 14;
     } else if (b->current_block < b->block_count) {
         size    = b->block_size;
         samples = b->samples_per_block;



More information about the ffmpeg-cvslog mailing list