Commit fda8b7ec authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/libdcadec: remove av_assert and check bits_per_sample more completely

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1019a1cb
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <libdcadec/dca_context.h> #include <libdcadec/dca_context.h>
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h" #include "libavutil/channel_layout.h"
#include "libavutil/common.h" #include "libavutil/common.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
...@@ -80,10 +79,9 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data, ...@@ -80,10 +79,9 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
avctx->channel_layout = channel_mask; avctx->channel_layout = channel_mask;
avctx->sample_rate = sample_rate; avctx->sample_rate = sample_rate;
av_assert0(bits_per_sample >= 16);
if (bits_per_sample == 16) if (bits_per_sample == 16)
avctx->sample_fmt = AV_SAMPLE_FMT_S16P; 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; avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
else { else {
av_log(avctx, AV_LOG_ERROR, "Unsupported number of bits per sample: %d\n", av_log(avctx, AV_LOG_ERROR, "Unsupported number of bits per sample: %d\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment