Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
071aca60
Commit
071aca60
authored
Sep 25, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/vorbis: rename local variables
parent
133e4d5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
vorbis_decoder_plugin.c
src/decoder/vorbis_decoder_plugin.c
+13
-14
No files found.
src/decoder/vorbis_decoder_plugin.c
View file @
071aca60
...
...
@@ -48,12 +48,11 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "vorbis"
#define OGG_CHUNK_SIZE 4096
#if G_BYTE_ORDER == G_BIG_ENDIAN
#define
OGG_DECODE_USE_BIGENDIAN 1
#define
VORBIS_BIG_ENDIAN true
#else
#define
OGG_DECODE_USE_BIGENDIAN 0
#define
VORBIS_BIG_ENDIAN false
#endif
struct
vorbis_input_stream
{
...
...
@@ -203,9 +202,9 @@ vorbis_stream_decode(struct decoder *decoder,
decoder_initialized
(
decoder
,
&
audio_format
,
vis
.
seekable
,
total_time
);
enum
decoder_command
cmd
=
decoder_get_command
(
decoder
);
char
chunk
[
OGG_CHUNK_SIZE
];
char
buffer
[
4096
];
int
prev_section
=
-
1
;
long
bitR
ate
=
0
;
unsigned
kbit_r
ate
=
0
;
do
{
if
(
cmd
==
DECODE_COMMAND_SEEK
)
{
...
...
@@ -217,12 +216,12 @@ vorbis_stream_decode(struct decoder *decoder,
}
int
current_section
;
long
ret
=
ov_read
(
&
vf
,
chunk
,
sizeof
(
chunk
),
OGG_DECODE_USE_BIG
ENDIAN
,
2
,
1
,
&
current_section
);
if
(
ret
==
OV_HOLE
)
/* bad packet */
ret
=
0
;
else
if
(
ret
<=
0
)
long
nbytes
=
ov_read
(
&
vf
,
buffer
,
sizeof
(
buffer
),
VORBIS_BIG_
ENDIAN
,
2
,
1
,
&
current_section
);
if
(
nbytes
==
OV_HOLE
)
/* bad packet */
nbytes
=
0
;
else
if
(
nbytes
<=
0
)
/* break on EOF or other error */
break
;
...
...
@@ -253,11 +252,11 @@ vorbis_stream_decode(struct decoder *decoder,
long
test
=
ov_bitrate_instant
(
&
vf
);
if
(
test
>
0
)
bitR
ate
=
test
/
1000
;
kbit_r
ate
=
test
/
1000
;
cmd
=
decoder_data
(
decoder
,
input_stream
,
chunk
,
ret
,
bitR
ate
);
buffer
,
nbytes
,
kbit_r
ate
);
}
while
(
cmd
!=
DECODE_COMMAND_STOP
);
ov_clear
(
&
vf
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment