Transparency is supported only by YUV and within specific bit depths.
Unified · Split
| @@ -597,6 +597,12 @@ static int read_header(FFV1Context *f) · 596 unmodified lines | ||
| 597 | 597 | } |
| 598 | 598 | |
| 599 | 599 | if (f->colorspace == 0) { |
| 600 | + if (f->transparency && f->avctx->bits_per_raw_sample > 8) { | |
| 601 | + av_log(f->avctx, AV_LOG_ERROR, | |
| 602 | + "Transparency not supported for bit depth %d\n", | |
| 603 | + f->avctx->bits_per_raw_sample); | |
| 604 | + return AVERROR(ENOSYS); | |
| 605 | + } | |
| 600 | 606 | if (!f->transparency && !f->chroma_planes) { |
| 601 | 607 | if (f->avctx->bits_per_raw_sample <= 8) |
| 602 | 608 | f->avctx->pix_fmt = AV_PIX_FMT_GRAY8; |
| @@ -695,6 +701,11 @@ static int read_header(FFV1Context *f) · 92 unmodified lines | ||
| 695 | 701 | "chroma subsampling not supported in this colorspace\n"); |
| 696 | 702 | return AVERROR(ENOSYS); |
| 697 | 703 | } |
| 704 | + if (f->transparency) { | |
| 705 | + av_log(f->avctx, AV_LOG_ERROR, | |
| 706 | + "Transparency not supported in this colorspace\n"); | |
| 707 | + return AVERROR(ENOSYS); | |
| 708 | + } | |
| 698 | 709 | switch (f->avctx->bits_per_raw_sample) { |
| 699 | 710 | case 0: |
| 700 | 711 | case 8: |