Revision 4f974de6 libavcodec/bink.c

View differences:

libavcodec/bink.c
911 911

  
912 912
    init_get_bits(&gb, pkt->data, bits_count);
913 913
    if (c->has_alpha) {
914
        int aplane_bits = get_bits_long(&gb, 32) << 3;
915
        if (aplane_bits <= 32 || (aplane_bits & 0x1F)) {
916
            av_log(avctx, AV_LOG_ERROR, "Incorrect alpha plane size %d\n", aplane_bits);
914
        if (c->version >= 'i')
915
            skip_bits_long(&gb, 32);
916
        if (bink_decode_plane(c, &gb, 3, 0) < 0)
917 917
            return -1;
918
        }
919
        skip_bits_long(&gb, aplane_bits - 32);
920 918
    }
921 919
    if (c->version >= 'i')
922 920
        skip_bits_long(&gb, 32);
......
977 975
        return 1;
978 976
    }
979 977

  
980
    avctx->pix_fmt = PIX_FMT_YUV420P;
978
    avctx->pix_fmt = c->has_alpha ? PIX_FMT_YUVA420P : PIX_FMT_YUV420P;
981 979

  
982 980
    avctx->idct_algo = FF_IDCT_BINK;
983 981
    dsputil_init(&c->dsp, avctx);

Also available in: Unified diff