decoder/vorbis: rename local variables
This commit is contained in:
parent
133e4d5c51
commit
071aca60be
@ -48,12 +48,11 @@
|
|||||||
|
|
||||||
#undef G_LOG_DOMAIN
|
#undef G_LOG_DOMAIN
|
||||||
#define G_LOG_DOMAIN "vorbis"
|
#define G_LOG_DOMAIN "vorbis"
|
||||||
#define OGG_CHUNK_SIZE 4096
|
|
||||||
|
|
||||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||||
#define OGG_DECODE_USE_BIGENDIAN 1
|
#define VORBIS_BIG_ENDIAN true
|
||||||
#else
|
#else
|
||||||
#define OGG_DECODE_USE_BIGENDIAN 0
|
#define VORBIS_BIG_ENDIAN false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct vorbis_input_stream {
|
struct vorbis_input_stream {
|
||||||
@ -203,9 +202,9 @@ vorbis_stream_decode(struct decoder *decoder,
|
|||||||
decoder_initialized(decoder, &audio_format, vis.seekable, total_time);
|
decoder_initialized(decoder, &audio_format, vis.seekable, total_time);
|
||||||
|
|
||||||
enum decoder_command cmd = decoder_get_command(decoder);
|
enum decoder_command cmd = decoder_get_command(decoder);
|
||||||
char chunk[OGG_CHUNK_SIZE];
|
char buffer[4096];
|
||||||
int prev_section = -1;
|
int prev_section = -1;
|
||||||
long bitRate = 0;
|
unsigned kbit_rate = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (cmd == DECODE_COMMAND_SEEK) {
|
if (cmd == DECODE_COMMAND_SEEK) {
|
||||||
@ -217,12 +216,12 @@ vorbis_stream_decode(struct decoder *decoder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int current_section;
|
int current_section;
|
||||||
long ret = ov_read(&vf, chunk, sizeof(chunk),
|
long nbytes = ov_read(&vf, buffer, sizeof(buffer),
|
||||||
OGG_DECODE_USE_BIGENDIAN, 2, 1,
|
VORBIS_BIG_ENDIAN, 2, 1,
|
||||||
¤t_section);
|
¤t_section);
|
||||||
if (ret == OV_HOLE) /* bad packet */
|
if (nbytes == OV_HOLE) /* bad packet */
|
||||||
ret = 0;
|
nbytes = 0;
|
||||||
else if (ret <= 0)
|
else if (nbytes <= 0)
|
||||||
/* break on EOF or other error */
|
/* break on EOF or other error */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -253,11 +252,11 @@ vorbis_stream_decode(struct decoder *decoder,
|
|||||||
|
|
||||||
long test = ov_bitrate_instant(&vf);
|
long test = ov_bitrate_instant(&vf);
|
||||||
if (test > 0)
|
if (test > 0)
|
||||||
bitRate = test / 1000;
|
kbit_rate = test / 1000;
|
||||||
|
|
||||||
cmd = decoder_data(decoder, input_stream,
|
cmd = decoder_data(decoder, input_stream,
|
||||||
chunk, ret,
|
buffer, nbytes,
|
||||||
bitRate);
|
kbit_rate);
|
||||||
} while (cmd != DECODE_COMMAND_STOP);
|
} while (cmd != DECODE_COMMAND_STOP);
|
||||||
|
|
||||||
ov_clear(&vf);
|
ov_clear(&vf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user