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
a5fd7c60
Commit
a5fd7c60
authored
Aug 05, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: prevent invalid reads in transcode_init()
parent
57d24225
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
avconv.c
avconv.c
+6
-4
No files found.
avconv.c
View file @
a5fd7c60
...
...
@@ -1523,7 +1523,7 @@ static int transcode_init(void)
{
int
ret
=
0
,
i
,
j
,
k
;
AVFormatContext
*
oc
;
AVCodecContext
*
codec
,
*
icodec
;
AVCodecContext
*
codec
;
OutputStream
*
ost
;
InputStream
*
ist
;
char
error
[
1024
];
...
...
@@ -1554,6 +1554,7 @@ static int transcode_init(void)
/* for each output stream, we compute the right encoding parameters */
for
(
i
=
0
;
i
<
nb_output_streams
;
i
++
)
{
AVCodecContext
*
icodec
=
NULL
;
ost
=
output_streams
[
i
];
oc
=
output_files
[
ost
->
file_index
]
->
ctx
;
ist
=
get_input_stream
(
ost
);
...
...
@@ -1714,9 +1715,10 @@ static int transcode_init(void)
ost
->
filter
->
filter
->
inputs
[
0
]
->
sample_aspect_ratio
;
codec
->
pix_fmt
=
ost
->
filter
->
filter
->
inputs
[
0
]
->
format
;
if
(
codec
->
width
!=
icodec
->
width
||
codec
->
height
!=
icodec
->
height
||
codec
->
pix_fmt
!=
icodec
->
pix_fmt
)
{
if
(
icodec
&&
(
codec
->
width
!=
icodec
->
width
||
codec
->
height
!=
icodec
->
height
||
codec
->
pix_fmt
!=
icodec
->
pix_fmt
))
{
codec
->
bits_per_raw_sample
=
0
;
}
...
...
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