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
dfa859b8
Commit
dfa859b8
authored
Nov 09, 2017
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/pngdec: fix av_bprint_finalize() usage.
parent
fc9dcfe7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
pngdec.c
libavcodec/pngdec.c
+9
-9
No files found.
libavcodec/pngdec.c
View file @
dfa859b8
...
...
@@ -524,9 +524,9 @@ static int decode_text_chunk(PNGDecContext *s, uint32_t length, int compressed,
if
((
ret
=
decode_zbuf
(
&
bp
,
data
,
data_end
))
<
0
)
return
ret
;
text_len
=
bp
.
len
;
av_bprint_finalize
(
&
bp
,
(
char
**
)
&
text
);
if
(
!
text
)
return
AVERROR
(
ENOMEM
)
;
ret
=
av_bprint_finalize
(
&
bp
,
(
char
**
)
&
text
);
if
(
ret
<
0
)
return
ret
;
}
else
{
text
=
(
uint8_t
*
)
data
;
text_len
=
data_end
-
text
;
...
...
@@ -862,9 +862,9 @@ static int decode_iccp_chunk(PNGDecContext *s, int length, AVFrame *f)
if
((
ret
=
decode_zbuf
(
&
bp
,
s
->
gb
.
buffer
,
s
->
gb
.
buffer
+
length
))
<
0
)
return
ret
;
av_bprint_finalize
(
&
bp
,
(
char
**
)
&
data
);
if
(
!
data
)
return
AVERROR
(
ENOMEM
)
;
ret
=
av_bprint_finalize
(
&
bp
,
(
char
**
)
&
data
);
if
(
ret
<
0
)
return
ret
;
sd
=
av_frame_new_side_data
(
f
,
AV_FRAME_DATA_ICC_PROFILE
,
bp
.
len
);
if
(
!
sd
)
{
...
...
@@ -1317,9 +1317,9 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s,
av_bprint_init
(
&
bp
,
0
,
-
1
);
av_bprintf
(
&
bp
,
"%i/%i"
,
num
,
100000
);
av_bprint_finalize
(
&
bp
,
&
gamma_str
);
if
(
!
gamma_str
)
return
AVERROR
(
ENOMEM
)
;
ret
=
av_bprint_finalize
(
&
bp
,
&
gamma_str
);
if
(
ret
<
0
)
return
ret
;
av_dict_set
(
&
p
->
metadata
,
"gamma"
,
gamma_str
,
AV_DICT_DONT_STRDUP_VAL
);
...
...
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