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) {
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) {
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)
typedef struct AVFormatParameters {
AVRational time_base;
- int sample_rate;
- int channels;
+#if FF_API_FORMAT_PARAMETERS
+ attribute_deprecated int sample_rate;
+ attribute_deprecated int channels;
+#endif
int width;
int height;
enum PixelFormat pix_fmt;
case AVMEDIA_TYPE_AUDIO: {
RawAudioDemuxerContext *s1 = s->priv_data;
+#if FF_API_FORMAT_PARAMETERS
if (ap->sample_rate)
st->codec->sample_rate = ap->sample_rate;
if (ap->channels)
st->codec->channels = ap->channels;
else st->codec->channels = 1;
+#endif
if (s1->sample_rate)
st->codec->sample_rate = s1->sample_rate;