[FFmpeg-cvslog] r22674 - trunk/libavcodec/wmaprodec.c

stefano subversion
Thu Mar 25 22:01:35 CET 2010


Author: stefano
Date: Thu Mar 25 22:01:35 2010
New Revision: 22674

Log:
Make wmaprodec.c:decode_init() return AVERROR_INVALIDDATA /
AVERROR_PATCHWELCOME in case of invalid / unsupported number of
channels specified, rather than return AVERROR_NOTSUPP.

Modified:
   trunk/libavcodec/wmaprodec.c

Modified: trunk/libavcodec/wmaprodec.c
==============================================================================
--- trunk/libavcodec/wmaprodec.c	Thu Mar 25 21:45:26 2010	(r22673)
+++ trunk/libavcodec/wmaprodec.c	Thu Mar 25 22:01:35 2010	(r22674)
@@ -343,9 +343,12 @@ static av_cold int decode_init(AVCodecCo
         }
     }
 
-    if (s->num_channels < 0 || s->num_channels > WMAPRO_MAX_CHANNELS) {
-        av_log_ask_for_sample(avctx, "invalid number of channels\n");
-        return AVERROR_NOTSUPP;
+    if (s->num_channels < 0) {
+        av_log(avctx, AV_LOG_ERROR, "invalid number of channels %d\n", s->num_channels);
+        return AVERROR_INVALIDDATA;
+    } else if (s->num_channels > WMAPRO_MAX_CHANNELS) {
+        av_log_ask_for_sample(avctx, "unsupported number of channels\n");
+        return AVERROR_PATCHWELCOME;
     }
 
     INIT_VLC_STATIC(&sf_vlc, SCALEVLCBITS, HUFF_SCALE_SIZE,



More information about the ffmpeg-cvslog mailing list