summaryrefslogtreecommitdiffstats
path: root/libavformat/brstm.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2012-12-15 21:15:04 -0300
committerPaul B Mahol <onemda@gmail.com>2012-12-16 10:34:33 +0000
commit7959c26fb04d744a98087a19b524d456faeb9e0f (patch)
treed4dc17f6470c824c12b3b8cd598ff57cd6919ec6 /libavformat/brstm.c
parentd0bdcbcb28a7536de88cffa00a71be322d84b5d7 (diff)
downloadffmpeg-streaming-7959c26fb04d744a98087a19b524d456faeb9e0f.zip
ffmpeg-streaming-7959c26fb04d744a98087a19b524d456faeb9e0f.tar.gz
brstm: fix number of samples for the last block
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/brstm.c')
-rw-r--r--libavformat/brstm.c2
1 files changed, 1 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud