Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
8e039121
Commit
8e039121
authored
Feb 25, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegaudiodec: dont memcpy() more than needed.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
b008ac18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
mpegaudiodec.c
libavcodec/mpegaudiodec.c
+2
-3
No files found.
libavcodec/mpegaudiodec.c
View file @
8e039121
...
...
@@ -1380,8 +1380,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
if
(
!
s
->
adu_mode
)
{
const
uint8_t
*
ptr
=
s
->
gb
.
buffer
+
(
get_bits_count
(
&
s
->
gb
)
>>
3
);
int
extrasize
=
av_clip
(
get_bits_left
(
&
s
->
gb
)
>>
3
,
0
,
FFMAX
(
0
,
LAST_BUF_SIZE
-
s
->
last_buf_size
));
int
extrasize
=
av_clip
(
get_bits_left
(
&
s
->
gb
)
>>
3
,
0
,
EXTRABYTES
);
assert
((
get_bits_count
(
&
s
->
gb
)
&
7
)
==
0
);
/* now we get bits from the main_data_begin offset */
av_dlog
(
s
->
avctx
,
"seekback: %d
\n
"
,
main_data_begin
);
...
...
@@ -1391,7 +1390,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
s
->
in_gb
=
s
->
gb
;
init_get_bits
(
&
s
->
gb
,
s
->
last_buf
,
s
->
last_buf_size
*
8
);
#if !UNCHECKED_BITSTREAM_READER
s
->
gb
.
size_in_bits_plus8
+=
extrasize
*
8
;
s
->
gb
.
size_in_bits_plus8
+=
FFMAX
(
extrasize
,
LAST_BUF_SIZE
-
s
->
last_buf_size
)
*
8
;
#endif
skip_bits_long
(
&
s
->
gb
,
8
*
(
s
->
last_buf_size
-
main_data_begin
));
}
...
...
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