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
bffd4dd1
Commit
bffd4dd1
authored
May 23, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: deprecate AVFormatParameters.{channels,sample_rate}.
parent
5b3865fc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
2 deletions
+12
-2
alsa-audio-dec.c
libavdevice/alsa-audio-dec.c
+2
-0
oss_audio.c
libavdevice/oss_audio.c
+2
-0
sndio_dec.c
libavdevice/sndio_dec.c
+2
-0
avformat.h
libavformat/avformat.h
+4
-2
rawdec.c
libavformat/rawdec.c
+2
-0
No files found.
libavdevice/alsa-audio-dec.c
View file @
bffd4dd1
...
@@ -60,11 +60,13 @@ static av_cold int audio_read_header(AVFormatContext *s1,
...
@@ -60,11 +60,13 @@ static av_cold int audio_read_header(AVFormatContext *s1,
enum
CodecID
codec_id
;
enum
CodecID
codec_id
;
snd_pcm_sw_params_t
*
sw_params
;
snd_pcm_sw_params_t
*
sw_params
;
#if FF_API_FORMAT_PARAMETERS
if
(
ap
->
sample_rate
>
0
)
if
(
ap
->
sample_rate
>
0
)
s
->
sample_rate
=
ap
->
sample_rate
;
s
->
sample_rate
=
ap
->
sample_rate
;
if
(
ap
->
channels
>
0
)
if
(
ap
->
channels
>
0
)
s
->
channels
=
ap
->
channels
;
s
->
channels
=
ap
->
channels
;
#endif
st
=
av_new_stream
(
s1
,
0
);
st
=
av_new_stream
(
s1
,
0
);
if
(
!
st
)
{
if
(
!
st
)
{
...
...
libavdevice/oss_audio.c
View file @
bffd4dd1
...
@@ -218,10 +218,12 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap)
...
@@ -218,10 +218,12 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap)
AVStream
*
st
;
AVStream
*
st
;
int
ret
;
int
ret
;
#if FF_API_FORMAT_PARAMETERS
if
(
ap
->
sample_rate
>
0
)
if
(
ap
->
sample_rate
>
0
)
s
->
sample_rate
=
ap
->
sample_rate
;
s
->
sample_rate
=
ap
->
sample_rate
;
if
(
ap
->
channels
>
0
)
if
(
ap
->
channels
>
0
)
s
->
channels
=
ap
->
channels
;
s
->
channels
=
ap
->
channels
;
#endif
st
=
av_new_stream
(
s1
,
0
);
st
=
av_new_stream
(
s1
,
0
);
if
(
!
st
)
{
if
(
!
st
)
{
...
...
libavdevice/sndio_dec.c
View file @
bffd4dd1
...
@@ -34,10 +34,12 @@ static av_cold int audio_read_header(AVFormatContext *s1,
...
@@ -34,10 +34,12 @@ static av_cold int audio_read_header(AVFormatContext *s1,
AVStream
*
st
;
AVStream
*
st
;
int
ret
;
int
ret
;
#if FF_API_FORMAT_PARAMETERS
if
(
ap
->
sample_rate
>
0
)
if
(
ap
->
sample_rate
>
0
)
s
->
sample_rate
=
ap
->
sample_rate
;
s
->
sample_rate
=
ap
->
sample_rate
;
if
(
ap
->
channels
>
0
)
if
(
ap
->
channels
>
0
)
s
->
channels
=
ap
->
channels
;
s
->
channels
=
ap
->
channels
;
#endif
st
=
av_new_stream
(
s1
,
0
);
st
=
av_new_stream
(
s1
,
0
);
if
(
!
st
)
if
(
!
st
)
...
...
libavformat/avformat.h
View file @
bffd4dd1
...
@@ -228,8 +228,10 @@ typedef struct AVProbeData {
...
@@ -228,8 +228,10 @@ typedef struct AVProbeData {
typedef
struct
AVFormatParameters
{
typedef
struct
AVFormatParameters
{
AVRational
time_base
;
AVRational
time_base
;
int
sample_rate
;
#if FF_API_FORMAT_PARAMETERS
int
channels
;
attribute_deprecated
int
sample_rate
;
attribute_deprecated
int
channels
;
#endif
int
width
;
int
width
;
int
height
;
int
height
;
enum
PixelFormat
pix_fmt
;
enum
PixelFormat
pix_fmt
;
...
...
libavformat/rawdec.c
View file @
bffd4dd1
...
@@ -47,11 +47,13 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -47,11 +47,13 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
case
AVMEDIA_TYPE_AUDIO
:
{
case
AVMEDIA_TYPE_AUDIO
:
{
RawAudioDemuxerContext
*
s1
=
s
->
priv_data
;
RawAudioDemuxerContext
*
s1
=
s
->
priv_data
;
#if FF_API_FORMAT_PARAMETERS
if
(
ap
->
sample_rate
)
if
(
ap
->
sample_rate
)
st
->
codec
->
sample_rate
=
ap
->
sample_rate
;
st
->
codec
->
sample_rate
=
ap
->
sample_rate
;
if
(
ap
->
channels
)
if
(
ap
->
channels
)
st
->
codec
->
channels
=
ap
->
channels
;
st
->
codec
->
channels
=
ap
->
channels
;
else
st
->
codec
->
channels
=
1
;
else
st
->
codec
->
channels
=
1
;
#endif
if
(
s1
->
sample_rate
)
if
(
s1
->
sample_rate
)
st
->
codec
->
sample_rate
=
s1
->
sample_rate
;
st
->
codec
->
sample_rate
=
s1
->
sample_rate
;
...
...
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