[FFmpeg-cvslog] avcodec/libdcadec: honor AVCodecContext bitexact flag

James Almer git at videolan.org
Fri Apr 10 03:38:29 CEST 2015


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Apr  9 03:56:58 2015 -0300| [3553b815f66cb42f79706d6be5c11c0b13d9ac2e] | committer: James Almer

avcodec/libdcadec: honor AVCodecContext bitexact flag

Reviewed-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavcodec/libdcadec.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libdcadec.c b/libavcodec/libdcadec.c
index 3ac4bcb..9ea61fa 100644
--- a/libavcodec/libdcadec.c
+++ b/libavcodec/libdcadec.c
@@ -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);
 



More information about the ffmpeg-cvslog mailing list