Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
d4325b2f
Commit
d4325b2f
authored
Jun 22, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swr: Remember previously set int_sample_format from user
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
0dd2790d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
options.c
libswresample/options.c
+2
-2
swresample.c
libswresample/swresample.c
+2
-0
swresample_internal.h
libswresample/swresample_internal.h
+1
-0
No files found.
libswresample/options.c
View file @
d4325b2f
...
...
@@ -49,8 +49,8 @@ static const AVOption options[]={
{
"in_sample_fmt"
,
"set input sample format"
,
OFFSET
(
in_sample_fmt
),
AV_OPT_TYPE_SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
INT_MAX
,
PARAM
},
{
"osf"
,
"set output sample format"
,
OFFSET
(
out_sample_fmt
),
AV_OPT_TYPE_SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
INT_MAX
,
PARAM
},
{
"out_sample_fmt"
,
"set output sample format"
,
OFFSET
(
out_sample_fmt
),
AV_OPT_TYPE_SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
INT_MAX
,
PARAM
},
{
"tsf"
,
"set internal sample format"
,
OFFSET
(
int_sample_fmt
),
AV_OPT_TYPE_SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
INT_MAX
,
PARAM
},
{
"internal_sample_fmt"
,
"set internal sample format"
,
OFFSET
(
int_sample_fmt
),
AV_OPT_TYPE_SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
INT_MAX
,
PARAM
},
{
"tsf"
,
"set internal sample format"
,
OFFSET
(
user_int_sample_fmt
),
AV_OPT_TYPE_SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
INT_MAX
,
PARAM
},
{
"internal_sample_fmt"
,
"set internal sample format"
,
OFFSET
(
user_int_sample_fmt
),
AV_OPT_TYPE_SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
INT_MAX
,
PARAM
},
{
"icl"
,
"set input channel layout"
,
OFFSET
(
user_in_ch_layout
),
AV_OPT_TYPE_CHANNEL_LAYOUT
,
{.
i64
=
0
},
0
,
INT64_MAX
,
PARAM
,
"channel_layout"
},
{
"in_channel_layout"
,
"set input channel layout"
,
OFFSET
(
user_in_ch_layout
),
AV_OPT_TYPE_CHANNEL_LAYOUT
,
{.
i64
=
0
},
0
,
INT64_MAX
,
PARAM
,
"channel_layout"
},
{
"ocl"
,
"set output channel layout"
,
OFFSET
(
user_out_ch_layout
),
AV_OPT_TYPE_CHANNEL_LAYOUT
,
{.
i64
=
0
},
0
,
INT64_MAX
,
PARAM
,
"channel_layout"
},
...
...
libswresample/swresample.c
View file @
d4325b2f
...
...
@@ -174,6 +174,8 @@ av_cold int swr_init(struct SwrContext *s){
s
->
in_ch_layout
=
s
->
user_in_ch_layout
;
s
->
out_ch_layout
=
s
->
user_out_ch_layout
;
s
->
int_sample_fmt
=
s
->
user_int_sample_fmt
;
if
(
av_get_channel_layout_nb_channels
(
s
->
in_ch_layout
)
>
SWR_CH_MAX
)
{
av_log
(
s
,
AV_LOG_WARNING
,
"Input channel layout 0x%"
PRIx64
" is invalid or unsupported.
\n
"
,
s
->
in_ch_layout
);
s
->
in_ch_layout
=
0
;
...
...
libswresample/swresample_internal.h
View file @
d4325b2f
...
...
@@ -119,6 +119,7 @@ struct SwrContext {
int
user_used_ch_count
;
///< User set used channel count
int64_t
user_in_ch_layout
;
///< User set input channel layout
int64_t
user_out_ch_layout
;
///< User set output channel layout
enum
AVSampleFormat
user_int_sample_fmt
;
///< User set internal sample format
struct
DitherContext
dither
;
...
...
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