[FFmpeg-devel] [PATCH] avcodecc/dnxhddec: fix ACT checking
Paul B Mahol
onemda at gmail.com
Mon Sep 16 18:34:05 EEST 2019
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavcodec/dnxhddec.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index 1e95086696..512accadfd 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -499,19 +499,17 @@ static int dnxhd_decode_macroblock(const DNXHDContext *ctx, RowContext *row,
qscale = get_bits(&row->gb, 11);
}
act = get_bits1(&row->gb);
- if (act) {
- if (!ctx->act) {
- static int act_warned;
- if (!act_warned) {
- act_warned = 1;
- av_log(ctx->avctx, AV_LOG_ERROR,
- "ACT flag set, in violation of frame header.\n");
- }
- } else if (row->format == -1) {
- row->format = act;
- } else if (row->format != act) {
- row->format = 2; // Variable
+ if (ctx->act != act) {
+ static int act_warned;
+ if (!act_warned) {
+ act_warned = 1;
+ av_log(ctx->avctx, AV_LOG_ERROR,
+ "ACT flag set, in violation of frame header.\n");
}
+ } else if (row->format == -1) {
+ row->format = act;
+ } else if (row->format != act) {
+ row->format = 2; // Variable
}
if (qscale != row->last_qscale) {
--
2.17.1
More information about the ffmpeg-devel
mailing list