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
f5962229
Commit
f5962229
authored
Oct 08, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avplay: use audio parameters from the decoded frame instead of AVCodecContext
parent
61d5313d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
avplay.c
avplay.c
+10
-10
No files found.
avplay.c
View file @
f5962229
...
...
@@ -1905,13 +1905,13 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
}
data_size
=
av_samples_get_buffer_size
(
NULL
,
dec
->
channels
,
is
->
frame
->
nb_samples
,
dec
->
sample_fm
t
,
1
);
is
->
frame
->
forma
t
,
1
);
audio_resample
=
dec
->
sample_fmt
!=
is
->
sdl_sample_fmt
||
dec
->
channel_layout
!=
is
->
sdl_channel_layout
;
audio_resample
=
is
->
frame
->
format
!=
is
->
sdl_sample_fmt
||
is
->
frame
->
channel_layout
!=
is
->
sdl_channel_layout
;
resample_changed
=
dec
->
sample_fmt
!=
is
->
resample_sample_fmt
||
dec
->
channel_layout
!=
is
->
resample_channel_layout
;
resample_changed
=
is
->
frame
->
format
!=
is
->
resample_sample_fmt
||
is
->
frame
->
channel_layout
!=
is
->
resample_channel_layout
;
if
((
!
is
->
avr
&&
audio_resample
)
||
resample_changed
)
{
int
ret
;
...
...
@@ -1925,9 +1925,9 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
}
}
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
);
av_opt_set_int
(
is
->
avr
,
"in_channel_layout"
,
is
->
frame
->
channel_layout
,
0
);
av_opt_set_int
(
is
->
avr
,
"in_sample_fmt"
,
is
->
frame
->
format
,
0
);
av_opt_set_int
(
is
->
avr
,
"in_sample_rate"
,
is
->
frame
->
sample_rate
,
0
);
av_opt_set_int
(
is
->
avr
,
"out_channel_layout"
,
is
->
sdl_channel_layout
,
0
);
av_opt_set_int
(
is
->
avr
,
"out_sample_fmt"
,
is
->
sdl_sample_fmt
,
0
);
av_opt_set_int
(
is
->
avr
,
"out_sample_rate"
,
dec
->
sample_rate
,
0
);
...
...
@@ -1937,8 +1937,8 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
break
;
}
}
is
->
resample_sample_fmt
=
dec
->
sample_fm
t
;
is
->
resample_channel_layout
=
dec
->
channel_layout
;
is
->
resample_sample_fmt
=
is
->
frame
->
forma
t
;
is
->
resample_channel_layout
=
is
->
frame
->
channel_layout
;
}
if
(
audio_resample
)
{
...
...
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