Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
cedc5705
Commit
cedc5705
authored
1 year ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
choose_sample_fmt: check for codec->sample_fmts
Change-Id: I3af7827e436e1e78d643c3c06186c1c412f909b5
parent
42cc4e03
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/media/libav_utils.cpp
+6
-5
6 additions, 5 deletions
src/media/libav_utils.cpp
with
6 additions
and
5 deletions
src/media/libav_utils.cpp
+
6
−
5
View file @
cedc5705
...
...
@@ -61,12 +61,13 @@ choose_sample_fmt(const AVCodec* codec,
const
AVSampleFormat
*
preferred_formats
,
int
preferred_formats_count
)
{
for
(
int
i
=
0
;
i
<
preferred_formats_count
;
++
i
)
{
for
(
auto
it
=
codec
->
sample_fmts
;
*
it
!=
-
1
;
++
it
)
{
if
(
*
it
==
preferred_formats
[
i
])
return
preferred_formats
[
i
];
if
(
codec
->
sample_fmts
)
for
(
int
i
=
0
;
i
<
preferred_formats_count
;
++
i
)
{
for
(
auto
it
=
codec
->
sample_fmts
;
*
it
!=
-
1
;
++
it
)
{
if
(
*
it
==
preferred_formats
[
i
])
return
preferred_formats
[
i
];
}
}
}
return
AV_SAMPLE_FMT_NONE
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment