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
f381fc36
Commit
f381fc36
authored
6 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
frame resizer: update format if format changed
Change-Id: Ieef91a39e066116544ff4d95efed6ba62718ac11
parent
1a6c97fc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/media/audio/audio_frame_resizer.cpp
+3
-2
3 additions, 2 deletions
src/media/audio/audio_frame_resizer.cpp
with
3 additions
and
2 deletions
src/media/audio/audio_frame_resizer.cpp
+
3
−
2
View file @
f381fc36
...
...
@@ -90,9 +90,10 @@ AudioFrameResizer::enqueue(std::shared_ptr<AudioFrame>&& frame)
{
int
ret
=
0
;
auto
f
=
frame
->
pointer
();
if
(
f
->
format
!=
(
int
)
format_
.
sampleFormat
||
f
->
channels
!=
(
int
)
format_
.
nb_channels
||
f
->
sample_rate
!=
(
int
)
format_
.
sample_rate
)
{
AudioFormat
format
(
f
->
sample_rate
,
f
->
channels
,
(
AVSampleFormat
)
f
->
format
);
if
(
format
!=
format_
)
{
RING_ERR
()
<<
"Expected "
<<
format_
<<
", but got "
<<
AudioFormat
(
f
->
sample_rate
,
f
->
channels
,
(
AVSampleFormat
)
f
->
format
);
throw
std
::
runtime_error
(
"Could not write samples to audio queue: input frame is not the right format"
);
setFormat
(
format
,
frameSize_
);
}
auto
nb_samples
=
samples
();
...
...
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