[FFmpeg-cvslog] avcodec/libdcadec: remove av_assert and check bits_per_sample more completely

Michael Niedermayer git at videolan.org
Mon Mar 30 22:57:20 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Mar 29 13:12:07 2015 +0200| [fda8b7ec7de6a6a1188a922a8878752798a4ee8d] | committer: Michael Niedermayer

avcodec/libdcadec: remove av_assert and check bits_per_sample more completely

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/libdcadec.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/libdcadec.c b/libavcodec/libdcadec.c
index 6e89262..3ac4bcb 100644
--- a/libavcodec/libdcadec.c
+++ b/libavcodec/libdcadec.c
@@ -21,7 +21,6 @@
 
 #include <libdcadec/dca_context.h>
 
-#include "libavutil/avassert.h"
 #include "libavutil/channel_layout.h"
 #include "libavutil/common.h"
 #include "libavutil/opt.h"
@@ -80,10 +79,9 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
     avctx->channel_layout = channel_mask;
     avctx->sample_rate    = sample_rate;
 
-    av_assert0(bits_per_sample >= 16);
     if (bits_per_sample == 16)
         avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
-    else if (bits_per_sample <= 24)
+    else if (bits_per_sample > 16 && bits_per_sample <= 24)
         avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
     else {
         av_log(avctx, AV_LOG_ERROR, "Unsupported number of bits per sample: %d\n",



More information about the ffmpeg-cvslog mailing list