diff --git a/libavformat/brstm.c b/libavformat/brstm.c index 0a874d374c..80f73ed0bd 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;