From 744702f266e52defb896b220c7e4eda97cf64b2d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Feb 2009 21:30:28 +0100 Subject: [PATCH] shout_mp3: use audio_format_frame_size() Use audio_format_frame_size() instead of channels*audio_format_sample_size(). --- src/output/shout_mp3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/output/shout_mp3.c b/src/output/shout_mp3.c index 0e5d778f7..a4ed37a14 100644 --- a/src/output/shout_mp3.c +++ b/src/output/shout_mp3.c @@ -142,11 +142,10 @@ shout_mp3_encoder_encode(struct shout_data *sd, const void *chunk, size_t len) float *left, *right; struct shout_buffer *buf = &(sd->buf); unsigned int samples; - int bytes = audio_format_sample_size(&sd->audio_format); struct lame_data *ld = (struct lame_data *)sd->encoder_data; int bytes_out; - samples = len / (bytes * sd->audio_format.channels); + samples = len / audio_format_sample_size(&sd->audio_format); left = g_malloc(sizeof(left[0]) * samples); if (sd->audio_format.channels > 1) right = g_malloc(sizeof(left[0]) * samples);