From 53d38278431987cc7c266e9fe84d481762bea47a Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 9 Nov 2013 23:22:15 +0100 Subject: Remove sh_audio->samplesize This member was redundant. sh_audio->sample_format indicates the sample size already. The TV code is a bit strange: the redundant sample size was part of the internal TV interface. Assume it's really redundant and not something else. The PCM decoder ignores the sample size anyway. --- audio/decode/ad_mpg123.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'audio/decode/ad_mpg123.c') diff --git a/audio/decode/ad_mpg123.c b/audio/decode/ad_mpg123.c index df9e82306d..47cb5d2039 100644 --- a/audio/decode/ad_mpg123.c +++ b/audio/decode/ad_mpg123.c @@ -206,22 +206,18 @@ static int set_format(sh_audio_t *sh, struct ad_mpg123_context *con) switch (encoding) { case MPG123_ENC_SIGNED_8: sh->sample_format = AF_FORMAT_S8; - sh->samplesize = 1; break; case MPG123_ENC_SIGNED_16: sh->sample_format = AF_FORMAT_S16_NE; - sh->samplesize = 2; break; /* To stay compatible with the oldest libmpg123 headers, do not rely * on float and 32 bit encoding symbols being defined. * Those formats came later */ case 0x1180: /* MPG123_ENC_SIGNED_32 */ sh->sample_format = AF_FORMAT_S32_NE; - sh->samplesize = 4; break; case 0x200: /* MPG123_ENC_FLOAT_32 */ sh->sample_format = AF_FORMAT_FLOAT_NE; - sh->samplesize = 4; break; default: /* This means we got a funny custom build of libmpg123 that only supports an unknown format. */ @@ -233,7 +229,7 @@ static int set_format(sh_audio_t *sh, struct ad_mpg123_context *con) /* Going to decode directly to MPlayer's memory. It is important * to have MPG123_AUTO_RESAMPLE disabled for the buffer size * being an all-time limit. */ - sh->audio_out_minsize = 1152 * 2 * sh->samplesize; + sh->audio_out_minsize = 1152 * 2 * (af_fmt2bits(sh->sample_format) / 8); #endif con->new_format = 0; } -- cgit v1.2.3