diff options
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/alsa-audio-dec.c | 2 | ||||
-rw-r--r-- | libavdevice/oss_audio.c | 2 | ||||
-rw-r--r-- | libavdevice/sndio_dec.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c index 285d338ff5..937f6a6ef7 100644 --- a/libavdevice/alsa-audio-dec.c +++ b/libavdevice/alsa-audio-dec.c @@ -60,11 +60,13 @@ static av_cold int audio_read_header(AVFormatContext *s1, enum CodecID codec_id; snd_pcm_sw_params_t *sw_params; +#if FF_API_FORMAT_PARAMETERS if (ap->sample_rate > 0) s->sample_rate = ap->sample_rate; if (ap->channels > 0) s->channels = ap->channels; +#endif st = av_new_stream(s1, 0); if (!st) { diff --git a/libavdevice/oss_audio.c b/libavdevice/oss_audio.c index bcd6540021..af46ea890b 100644 --- a/libavdevice/oss_audio.c +++ b/libavdevice/oss_audio.c @@ -218,10 +218,12 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap) AVStream *st; int ret; +#if FF_API_FORMAT_PARAMETERS if (ap->sample_rate > 0) s->sample_rate = ap->sample_rate; if (ap->channels > 0) s->channels = ap->channels; +#endif st = av_new_stream(s1, 0); if (!st) { diff --git a/libavdevice/sndio_dec.c b/libavdevice/sndio_dec.c index abe13e1359..2690ee395c 100644 --- a/libavdevice/sndio_dec.c +++ b/libavdevice/sndio_dec.c @@ -34,10 +34,12 @@ static av_cold int audio_read_header(AVFormatContext *s1, AVStream *st; int ret; +#if FF_API_FORMAT_PARAMETERS if (ap->sample_rate > 0) s->sample_rate = ap->sample_rate; if (ap->channels > 0) s->channels = ap->channels; +#endif st = av_new_stream(s1, 0); if (!st) |