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
10de86b8
Commit
10de86b8
authored
Jun 15, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: don't abuse a global for passing pixel format from input to output
It's broken with multiple files or video streams.
parent
62940bb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
ffmpeg.c
ffmpeg.c
+5
-3
No files found.
ffmpeg.c
View file @
10de86b8
...
...
@@ -2192,6 +2192,10 @@ static int transcode(AVFormatContext **output_files,
ost
->
resample_channels
=
icodec
->
channels
;
break
;
case
AVMEDIA_TYPE_VIDEO
:
if
(
codec
->
pix_fmt
==
PIX_FMT_NONE
)
codec
->
pix_fmt
=
icodec
->
pix_fmt
;
choose_pixel_fmt
(
ost
->
st
,
ost
->
enc
);
if
(
ost
->
st
->
codec
->
pix_fmt
==
PIX_FMT_NONE
)
{
fprintf
(
stderr
,
"Video pixel format is unknown, stream cannot be encoded
\n
"
);
ffmpeg_exit
(
1
);
...
...
@@ -3295,7 +3299,6 @@ static int opt_input_file(const char *opt, const char *filename)
set_context_opts
(
dec
,
avcodec_opts
[
AVMEDIA_TYPE_VIDEO
],
AV_OPT_FLAG_VIDEO_PARAM
|
AV_OPT_FLAG_DECODING_PARAM
,
input_codecs
[
nb_input_codecs
-
1
]);
frame_height
=
dec
->
height
;
frame_width
=
dec
->
width
;
frame_pix_fmt
=
dec
->
pix_fmt
;
rfps
=
ic
->
streams
[
i
]
->
r_frame_rate
.
num
;
rfps_base
=
ic
->
streams
[
i
]
->
r_frame_rate
.
den
;
if
(
dec
->
lowres
)
{
...
...
@@ -3348,6 +3351,7 @@ static int opt_input_file(const char *opt, const char *filename)
video_channel
=
0
;
frame_rate
=
(
AVRational
){
0
,
0
};
frame_pix_fmt
=
PIX_FMT_NONE
;
audio_sample_rate
=
0
;
audio_channels
=
0
;
...
...
@@ -3471,8 +3475,6 @@ static void new_video_stream(AVFormatContext *oc, int file_idx)
video_enc
->
pix_fmt
=
frame_pix_fmt
;
st
->
sample_aspect_ratio
=
video_enc
->
sample_aspect_ratio
;
choose_pixel_fmt
(
st
,
codec
);
if
(
intra_only
)
video_enc
->
gop_size
=
0
;
if
(
video_qscale
||
same_quality
)
{
...
...
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