avcodec/libdcadec: honor AVCodecContext bitexact flag

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2015-04-09 03:56:58 -03:00
parent eff72a6c73
commit 3553b815f6

View File

@ -167,8 +167,13 @@ static av_cold int dcadec_close(AVCodecContext *avctx)
static av_cold int dcadec_init(AVCodecContext *avctx)
{
DCADecContext *s = avctx->priv_data;
int flags = 0;
s->ctx = dcadec_context_create(0);
/* Affects only lossy DTS profiles. DTS-HD MA is always bitexact */
if (avctx->flags & CODEC_FLAG_BITEXACT)
flags |= DCADEC_FLAG_CORE_BIT_EXACT;
s->ctx = dcadec_context_create(flags);
if (!s->ctx)
return AVERROR(ENOMEM);