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
c61c8536
Commit
c61c8536
authored
Jun 09, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/bintext: allocate FF_INPUT_BUFFER_PADDING_SIZE for extradata
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
eae983f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
bintext.c
libavformat/bintext.c
+4
-4
No files found.
libavformat/bintext.c
View file @
c61c8536
...
@@ -151,7 +151,7 @@ static int bintext_read_header(AVFormatContext *s)
...
@@ -151,7 +151,7 @@ static int bintext_read_header(AVFormatContext *s)
st
->
codec
->
codec_id
=
CODEC_ID_BINTEXT
;
st
->
codec
->
codec_id
=
CODEC_ID_BINTEXT
;
st
->
codec
->
extradata_size
=
2
;
st
->
codec
->
extradata_size
=
2
;
st
->
codec
->
extradata
=
av_malloc
(
st
->
codec
->
extradata_size
);
st
->
codec
->
extradata
=
av_malloc
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
st
->
codec
->
extradata
)
if
(
!
st
->
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
st
->
codec
->
extradata
[
0
]
=
16
;
st
->
codec
->
extradata
[
0
]
=
16
;
...
@@ -208,7 +208,7 @@ static int xbin_read_header(AVFormatContext *s)
...
@@ -208,7 +208,7 @@ static int xbin_read_header(AVFormatContext *s)
st
->
codec
->
extradata_size
+=
fontheight
*
(
flags
&
0x10
?
512
:
256
);
st
->
codec
->
extradata_size
+=
fontheight
*
(
flags
&
0x10
?
512
:
256
);
st
->
codec
->
codec_id
=
flags
&
4
?
CODEC_ID_XBIN
:
CODEC_ID_BINTEXT
;
st
->
codec
->
codec_id
=
flags
&
4
?
CODEC_ID_XBIN
:
CODEC_ID_BINTEXT
;
st
->
codec
->
extradata
=
av_malloc
(
st
->
codec
->
extradata_size
);
st
->
codec
->
extradata
=
av_malloc
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
st
->
codec
->
extradata
)
if
(
!
st
->
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
st
->
codec
->
extradata
[
0
]
=
fontheight
;
st
->
codec
->
extradata
[
0
]
=
fontheight
;
...
@@ -242,7 +242,7 @@ static int adf_read_header(AVFormatContext *s)
...
@@ -242,7 +242,7 @@ static int adf_read_header(AVFormatContext *s)
st
->
codec
->
codec_id
=
CODEC_ID_BINTEXT
;
st
->
codec
->
codec_id
=
CODEC_ID_BINTEXT
;
st
->
codec
->
extradata_size
=
2
+
48
+
4096
;
st
->
codec
->
extradata_size
=
2
+
48
+
4096
;
st
->
codec
->
extradata
=
av_malloc
(
st
->
codec
->
extradata_size
);
st
->
codec
->
extradata
=
av_malloc
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
st
->
codec
->
extradata
)
if
(
!
st
->
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
st
->
codec
->
extradata
[
0
]
=
16
;
st
->
codec
->
extradata
[
0
]
=
16
;
...
@@ -299,7 +299,7 @@ static int idf_read_header(AVFormatContext *s)
...
@@ -299,7 +299,7 @@ static int idf_read_header(AVFormatContext *s)
st
->
codec
->
codec_id
=
CODEC_ID_IDF
;
st
->
codec
->
codec_id
=
CODEC_ID_IDF
;
st
->
codec
->
extradata_size
=
2
+
48
+
4096
;
st
->
codec
->
extradata_size
=
2
+
48
+
4096
;
st
->
codec
->
extradata
=
av_malloc
(
st
->
codec
->
extradata_size
);
st
->
codec
->
extradata
=
av_malloc
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
st
->
codec
->
extradata
)
if
(
!
st
->
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
st
->
codec
->
extradata
[
0
]
=
16
;
st
->
codec
->
extradata
[
0
]
=
16
;
...
...
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