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
85e5b866
Commit
85e5b866
authored
May 03, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avplay: properly close/reopen AVAudioResampleContext on channel layout change
fixes Bug#280
parent
f1322480
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
avplay.c
avplay.c
+3
-1
No files found.
avplay.c
View file @
85e5b866
...
...
@@ -2060,15 +2060,17 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
dec
->
channel_layout
!=
is
->
resample_channel_layout
;
if
((
!
is
->
avr
&&
audio_resample
)
||
resample_changed
)
{
int
ret
;
if
(
is
->
avr
)
avresample_close
(
is
->
avr
);
else
if
(
audio_resample
)
{
int
ret
;
is
->
avr
=
avresample_alloc_context
();
if
(
!
is
->
avr
)
{
fprintf
(
stderr
,
"error allocating AVAudioResampleContext
\n
"
);
break
;
}
}
if
(
audio_resample
)
{
av_opt_set_int
(
is
->
avr
,
"in_channel_layout"
,
dec
->
channel_layout
,
0
);
av_opt_set_int
(
is
->
avr
,
"in_sample_fmt"
,
dec
->
sample_fmt
,
0
);
av_opt_set_int
(
is
->
avr
,
"in_sample_rate"
,
dec
->
sample_rate
,
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