-#if FF_API_OLD_SAMPLE_FMT
-const char *avcodec_get_sample_fmt_name(int sample_fmt)
-{
- return av_get_sample_fmt_name(sample_fmt);
-}
-
-enum AVSampleFormat avcodec_get_sample_fmt(const char* name)
-{
- return av_get_sample_fmt(name);
-}
-
-void avcodec_sample_fmt_string (char *buf, int buf_size, int sample_fmt)
-{
- av_get_sample_fmt_string(buf, buf_size, sample_fmt);
-}
-#endif
-
-int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
-{
- switch(nb_channels) {
- case 1: return CH_LAYOUT_MONO;
- case 2: return CH_LAYOUT_STEREO;
- case 3: return CH_LAYOUT_SURROUND;
- case 4: return CH_LAYOUT_QUAD;
- case 5: return CH_LAYOUT_5POINT0;
- case 6: return CH_LAYOUT_5POINT1;
- case 8: return CH_LAYOUT_7POINT1;
- default: return 0;
- }
-}
-
-#if FF_API_OLD_AUDIOCONVERT
-int64_t avcodec_get_channel_layout(const char *name)
-{
- return av_get_channel_layout(name);
-}
-
-void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout)
-{
- av_get_channel_layout_string(buf, buf_size, nb_channels, channel_layout);
-}
-
-int avcodec_channel_layout_num_channels(int64_t channel_layout)
-{
- return av_get_channel_layout_nb_channels(channel_layout);
-}
-#endif
-