Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
16db88a0
Commit
16db88a0
authored
May 04, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vorbis_parser: fix blocksize
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
441dce21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
vorbis_parser.c
libavcodec/vorbis_parser.c
+5
-5
No files found.
libavcodec/vorbis_parser.c
View file @
16db88a0
...
...
@@ -164,7 +164,7 @@ static int parse_setup_header(AVCodecContext *avctx, VorbisParseContext *s,
skip_bits_long
(
&
gb
,
got_framing_bit
);
for
(
i
=
mode_count
-
1
;
i
>=
0
;
i
--
)
{
skip_bits_long
(
&
gb
,
40
);
s
->
mode_blocksize
[
i
]
=
s
->
blocksize
[
get_bits1
(
&
gb
)]
;
s
->
mode_blocksize
[
i
]
=
get_bits1
(
&
gb
)
;
}
bad_header:
...
...
@@ -195,7 +195,7 @@ int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s)
return
ret
;
s
->
valid_extradata
=
1
;
s
->
previous_blocksize
=
s
->
mode_blocksize
[
0
];
s
->
previous_blocksize
=
s
->
blocksize
[
s
->
mode_blocksize
[
0
]
];
return
0
;
}
...
...
@@ -221,11 +221,11 @@ int avpriv_vorbis_parse_frame(VorbisParseContext *s, const uint8_t *buf,
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Invalid mode in packet
\n
"
);
return
AVERROR_INVALIDDATA
;
}
if
(
mode
)
{
if
(
s
->
mode_blocksize
[
mode
])
{
int
flag
=
!!
(
buf
[
0
]
&
s
->
prev_mask
);
previous_blocksize
=
s
->
blocksize
[
flag
];
}
current_blocksize
=
s
->
mode_blocksize
[
mode
];
current_blocksize
=
s
->
blocksize
[
s
->
mode_blocksize
[
mode
]
];
duration
=
(
previous_blocksize
+
current_blocksize
)
>>
2
;
s
->
previous_blocksize
=
current_blocksize
;
}
...
...
@@ -236,7 +236,7 @@ int avpriv_vorbis_parse_frame(VorbisParseContext *s, const uint8_t *buf,
void
avpriv_vorbis_parse_reset
(
VorbisParseContext
*
s
)
{
if
(
s
->
valid_extradata
)
s
->
previous_blocksize
=
0
;
s
->
previous_blocksize
=
s
->
blocksize
[
0
]
;
}
#if CONFIG_VORBIS_PARSER
...
...
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