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
ae2cb929
Commit
ae2cb929
authored
Aug 14, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg_opt: Prefer audio streams with packets
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
856452cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
ffmpeg_opt.c
ffmpeg_opt.c
+5
-3
No files found.
ffmpeg_opt.c
View file @
ae2cb929
...
...
@@ -1992,12 +1992,14 @@ static int open_output_file(OptionsContext *o, const char *filename)
/* audio: most channels */
if
(
!
o
->
audio_disable
&&
av_guess_codec
(
oc
->
oformat
,
NULL
,
filename
,
NULL
,
AVMEDIA_TYPE_AUDIO
)
!=
AV_CODEC_ID_NONE
)
{
int
channels
=
0
,
idx
=
-
1
;
int
best_score
=
0
,
idx
=
-
1
;
for
(
i
=
0
;
i
<
nb_input_streams
;
i
++
)
{
int
score
;
ist
=
input_streams
[
i
];
score
=
ist
->
st
->
codec
->
channels
+
100000000
*!!
ist
->
st
->
codec_info_nb_frames
;
if
(
ist
->
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
&&
ist
->
st
->
codec
->
channels
>
channels
)
{
channels
=
ist
->
st
->
codec
->
channels
;
score
>
best_score
)
{
best_score
=
score
;
idx
=
i
;
}
}
...
...
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