diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-05-23 20:13:28 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-05-25 15:55:46 +0200 |
commit | bffd4dd1d36b1e9b9479c81b370c134ffb434e1a (patch) | |
tree | 8842f73148551a471cff426366ae66224ee48ec1 /libavformat | |
parent | 5b3865fc5f9675dd55f7dd7d5ae3b9ed58c3310c (diff) | |
download | ffmpeg-bffd4dd1d36b1e9b9479c81b370c134ffb434e1a.tar.gz |
lavf: deprecate AVFormatParameters.{channels,sample_rate}.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avformat.h | 6 | ||||
-rw-r--r-- | libavformat/rawdec.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 35e6c15f81..64bbd22396 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -228,8 +228,10 @@ typedef struct AVProbeData { 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; diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c index 81a6459307..b545dbd6d7 100644 --- a/libavformat/rawdec.c +++ b/libavformat/rawdec.c @@ -47,11 +47,13 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap) 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; |