[FFmpeg-cvslog] imc: set channels to 1 instead of validating it

Justin Ruggles git at videolan.org
Fri Nov 2 14:32:41 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Mon Oct 22 15:54:29 2012 -0400| [1c7a0161538a9e8417086759a5d6d3295337c433] | committer: Justin Ruggles

imc: set channels to 1 instead of validating it

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c7a0161538a9e8417086759a5d6d3295337c433
---

 libavcodec/imc.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 1156e8a..4c2d01d 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -175,8 +175,10 @@ static av_cold int imc_decode_init(AVCodecContext *avctx)
     IMCContext *q = avctx->priv_data;
     double r1, r2;
 
-    if ((avctx->codec_id == AV_CODEC_ID_IMC && avctx->channels != 1)
-        || (avctx->codec_id == AV_CODEC_ID_IAC && avctx->channels > 2)) {
+    if (avctx->codec_id == AV_CODEC_ID_IMC)
+        avctx->channels = 1;
+
+    if (avctx->channels > 2) {
         av_log_ask_for_sample(avctx, "Number of channels is not supported\n");
         return AVERROR_PATCHWELCOME;
     }



More information about the ffmpeg-cvslog mailing list