Browse Source

avcodec/ffv1dec: Fix skip_alpha

Fixes Ticket4322

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
cf52e6d012
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/ffv1dec.c

+ 2
- 1
libavcodec/ffv1dec.c View File

@@ -645,6 +645,8 @@ static int read_header(FFV1Context *f)
chroma_h_shift = get_symbol(c, state, 0);
chroma_v_shift = get_symbol(c, state, 0);
transparency = get_rac(c, state);
if (colorspace == 0 && f->avctx->skip_alpha)
transparency = 0;

if (f->plane_count) {
if (colorspace != f->colorspace ||
@@ -675,7 +677,6 @@ static int read_header(FFV1Context *f)
}

if (f->colorspace == 0) {
if (f->avctx->skip_alpha) f->transparency = 0;
if (!f->transparency && !f->chroma_planes) {
if (f->avctx->bits_per_raw_sample <= 8)
f->avctx->pix_fmt = AV_PIX_FMT_GRAY8;


Loading…
Cancel
Save