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
e831b3b8
Commit
e831b3b8
authored
Oct 23, 2012
by
Diego Biurrun
Committed by
Mans Rullgard
Oct 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
av_memcpy_backptr: Drop no longer necessary malloc padding
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
d82f1885
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
dfa.c
libavcodec/dfa.c
+1
-1
eatgv.c
libavcodec/eatgv.c
+1
-2
lcldec.c
libavcodec/lcldec.c
+2
-1
No files found.
libavcodec/dfa.c
View file @
e831b3b8
...
@@ -43,7 +43,7 @@ static av_cold int dfa_decode_init(AVCodecContext *avctx)
...
@@ -43,7 +43,7 @@ static av_cold int dfa_decode_init(AVCodecContext *avctx)
if
((
ret
=
av_image_check_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
))
<
0
)
if
((
ret
=
av_image_check_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
))
<
0
)
return
ret
;
return
ret
;
s
->
frame_buf
=
av_mallocz
(
avctx
->
width
*
avctx
->
height
+
AV_LZO_OUTPUT_PADDING
);
s
->
frame_buf
=
av_mallocz
(
avctx
->
width
*
avctx
->
height
);
if
(
!
s
->
frame_buf
)
if
(
!
s
->
frame_buf
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
...
...
libavcodec/eatgv.c
View file @
e831b3b8
...
@@ -294,8 +294,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
...
@@ -294,8 +294,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
s
->
frame
.
buffer_hints
=
FF_BUFFER_HINTS_VALID
;
s
->
frame
.
buffer_hints
=
FF_BUFFER_HINTS_VALID
;
s
->
frame
.
linesize
[
0
]
=
s
->
width
;
s
->
frame
.
linesize
[
0
]
=
s
->
width
;
/* allocate additional 12 bytes to accommodate av_memcpy_backptr() OUTBUF_PADDED optimisation */
s
->
frame
.
data
[
0
]
=
av_malloc
(
s
->
width
*
s
->
height
);
s
->
frame
.
data
[
0
]
=
av_malloc
(
s
->
width
*
s
->
height
+
12
);
if
(
!
s
->
frame
.
data
[
0
])
if
(
!
s
->
frame
.
data
[
0
])
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
s
->
frame
.
data
[
1
]
=
av_malloc
(
AVPALETTE_SIZE
);
s
->
frame
.
data
[
1
]
=
av_malloc
(
AVPALETTE_SIZE
);
...
...
libavcodec/lcldec.c
View file @
e831b3b8
...
@@ -476,7 +476,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
...
@@ -476,7 +476,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
{
{
LclDecContext
*
const
c
=
avctx
->
priv_data
;
LclDecContext
*
const
c
=
avctx
->
priv_data
;
unsigned
int
basesize
=
avctx
->
width
*
avctx
->
height
;
unsigned
int
basesize
=
avctx
->
width
*
avctx
->
height
;
unsigned
int
max_basesize
=
FFALIGN
(
avctx
->
width
,
4
)
*
FFALIGN
(
avctx
->
height
,
4
)
+
AV_LZO_OUTPUT_PADDING
;
unsigned
int
max_basesize
=
FFALIGN
(
avctx
->
width
,
4
)
*
FFALIGN
(
avctx
->
height
,
4
);
unsigned
int
max_decomp_size
;
unsigned
int
max_decomp_size
;
if
(
avctx
->
extradata_size
<
8
)
{
if
(
avctx
->
extradata_size
<
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