---
 libavcodec/dcadec.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index b2e9e8a..f23c00c 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -1288,9 +1288,16 @@ static int dca_filter_channels(DCAContext *s, int 
block_index)
     }
 
     /* Down mixing */
+#if FF_API_REQUEST_CHANNELS
+FF_DISABLE_DEPRECATION_WARNINGS
     if (s->prim_channels > 2 &&
         (s->avctx->request_channels == 2 ||
          s->avctx->request_channel_layout == AV_CH_LAYOUT_STEREO)) {
+FF_ENABLE_DEPRECATION_WARNINGS
+#else
+    if (s->prim_channels > 2 &&
+        s->avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) {
+#endif
         dca_downmix(s->samples_chanptr, s->amode, s->downmix_coef, 
s->channel_order_tab);
     }
 
@@ -1806,8 +1813,12 @@ static int dca_decode_frame(AVCodecContext *avctx, void 
*data,
         avctx->channel_layout = dca_core_channel_layout[s->amode];
 
         if (s->xch_present &&
+#if FF_API_REQUEST_CHANNELS
+FF_DISABLE_DEPRECATION_WARNINGS
             (!avctx->request_channels ||
              avctx->request_channels > num_core_channels + !!s->lfe) &&
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
             (!avctx->request_channel_layout ||
              avctx->request_channel_layout & AV_CH_BACK_CENTER)) {
             avctx->channel_layout |= AV_CH_BACK_CENTER;
@@ -1831,9 +1842,16 @@ static int dca_decode_frame(AVCodecContext *avctx, void 
*data,
             s->channel_order_tab[channels - 1 - !!s->lfe] < 0)
             return AVERROR_INVALIDDATA;
 
+#if FF_API_REQUEST_CHANNELS
+FF_DISABLE_DEPRECATION_WARNINGS
         if (s->prim_channels > 2 &&
             (avctx->request_channels == 2 ||
              avctx->request_channel_layout == AV_CH_LAYOUT_STEREO)) {
+FF_ENABLE_DEPRECATION_WARNINGS
+#else
+        if (s->prim_channels > 2 &&
+            avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) {
+#endif
             channels = 2;
             s->output = DCA_STEREO;
             avctx->channel_layout = AV_CH_LAYOUT_STEREO;
@@ -1929,9 +1947,16 @@ static av_cold int dca_decode_init(AVCodecContext *avctx)
     avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
 
     /* allow downmixing to stereo */
+#if FF_API_REQUEST_CHANNELS
+FF_DISABLE_DEPRECATION_WARNINGS
     if (avctx->channels > 2 &&
         (avctx->request_channels == 2 ||
          avctx->request_channel_layout == AV_CH_LAYOUT_STEREO)) {
+FF_ENABLE_DEPRECATION_WARNINGS
+#else
+    if (avctx->channels > 2 &&
+        avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) {
+#endif
         avctx->channels = 2;
     }
 
-- 
1.8.3.4 (Apple Git-47)

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to