Commit b97f6ef9 authored by Diego Biurrun's avatar Diego Biurrun

pcm-dvd: Move a variable to a smaller scope

This avoids an unused variable warning on big-endian systems.
parent 4d5b99da
...@@ -154,21 +154,21 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src, ...@@ -154,21 +154,21 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src,
GetByteContext gb; GetByteContext gb;
int i; int i;
uint8_t t; uint8_t t;
int samples;
bytestream2_init(&gb, src, blocks * s->block_size); bytestream2_init(&gb, src, blocks * s->block_size);
switch (avctx->bits_per_coded_sample) { switch (avctx->bits_per_coded_sample) {
case 16: case 16: {
#if HAVE_BIGENDIAN #if HAVE_BIGENDIAN
bytestream2_get_buffer(&gb, dst16, blocks * s->block_size); bytestream2_get_buffer(&gb, dst16, blocks * s->block_size);
dst16 += blocks * s->block_size / 2; dst16 += blocks * s->block_size / 2;
#else #else
samples = blocks * avctx->channels; int samples = blocks * avctx->channels;
do { do {
*dst16++ = bytestream2_get_be16u(&gb); *dst16++ = bytestream2_get_be16u(&gb);
} while (--samples); } while (--samples);
#endif #endif
return dst16; return dst16;
}
case 20: case 20:
do { do {
for (i = s->groups_per_block; i; i--) { for (i = s->groups_per_block; i; i--) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment