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
28205629
Commit
28205629
authored
Oct 29, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/4xm: use av_fast_padded_malloc()
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
c783bec6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
4xm.c
libavcodec/4xm.c
+4
-8
No files found.
libavcodec/4xm.c
View file @
28205629
...
...
@@ -461,14 +461,12 @@ static int decode_p_frame(FourXContext *f, AVFrame *frame,
return
AVERROR_INVALIDDATA
;
}
av_fast_malloc
(
&
f
->
bitstream_buffer
,
&
f
->
bitstream_buffer_size
,
bitstream_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
av_fast_
padded_
malloc
(
&
f
->
bitstream_buffer
,
&
f
->
bitstream_buffer_size
,
bitstream_size
);
if
(
!
f
->
bitstream_buffer
)
return
AVERROR
(
ENOMEM
);
f
->
dsp
.
bswap_buf
(
f
->
bitstream_buffer
,
(
const
uint32_t
*
)(
buf
+
extra
),
bitstream_size
/
4
);
memset
((
uint8_t
*
)
f
->
bitstream_buffer
+
bitstream_size
,
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
init_get_bits
(
&
f
->
gb
,
f
->
bitstream_buffer
,
8
*
bitstream_size
);
wordstream_offset
=
extra
+
bitstream_size
;
...
...
@@ -803,14 +801,12 @@ static int decode_i_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf, i
prestream_size
=
length
+
buf
-
prestream
;
av_fast_malloc
(
&
f
->
bitstream_buffer
,
&
f
->
bitstream_buffer_size
,
prestream_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
av_fast_
padded_
malloc
(
&
f
->
bitstream_buffer
,
&
f
->
bitstream_buffer_size
,
prestream_size
);
if
(
!
f
->
bitstream_buffer
)
return
AVERROR
(
ENOMEM
);
f
->
dsp
.
bswap_buf
(
f
->
bitstream_buffer
,
(
const
uint32_t
*
)
prestream
,
prestream_size
/
4
);
memset
((
uint8_t
*
)
f
->
bitstream_buffer
+
prestream_size
,
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
init_get_bits
(
&
f
->
pre_gb
,
f
->
bitstream_buffer
,
8
*
prestream_size
);
f
->
last_dc
=
0
*
128
*
8
*
8
;
...
...
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