aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-09-06 13:39:22 +0200
committerPaul B Mahol <onemda@gmail.com>2018-09-06 13:47:48 +0200
commit237bbf6678a0c3fc6962716edf72db1063de860c (patch)
tree2d8f56e6c820bb9c696df87940a2217767e45089
parent7bb90a9449bc845ffbde0eea0dfcaf2b3eed4256 (diff)
downloadffmpeg-237bbf6678a0c3fc6962716edf72db1063de860c.tar.gz
avcodec/dnxhddec: ask for samples with alpha
-rw-r--r--libavcodec/dnxhddec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index 11d0bf424a..ae8b0ffafa 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -67,6 +67,8 @@ typedef struct DNXHDContext {
const CIDEntry *cid_table;
int bit_depth; // 8, 10, 12 or 0 if not initialized at all.
int is_444;
+ int alpha;
+ int lla;
int mbaff;
int act;
int (*decode_dct_block)(const struct DNXHDContext *ctx,
@@ -205,6 +207,10 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
ctx->cur_field = 0;
}
ctx->mbaff = (buf[0x6] >> 5) & 1;
+ ctx->alpha = buf[0x7] & 1;
+ ctx->lla = (buf[0x7] >> 1) & 1;
+ if (ctx->alpha)
+ avpriv_request_sample(ctx->avctx, "alpha");
ctx->height = AV_RB16(buf + 0x18);
ctx->width = AV_RB16(buf + 0x1a);