"Fixes" Ticket7063
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -528,6 +528,11 @@ static av_cold int encode_init(AVCodecContext *avctx) · 527 unmodified lines | ||
| 528 | 528 | avctx->slices > 1) |
| 529 | 529 | s->version = FFMAX(s->version, 2); |
| 530 | 530 | |
| 531 | + if ((avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) && s->ac == AC_GOLOMB_RICE) { | |
| 532 | + av_log(avctx, AV_LOG_ERROR, "2 Pass mode is not possible with golomb coding\n"); | |
| 533 | + return AVERROR(EINVAL); | |
| 534 | + } | |
| 535 | + | |
| 531 | 536 | // Unspecified level & slices, we choose version 1.2+ to ensure multithreaded decodability |
| 532 | 537 | if (avctx->slices == 0 && avctx->level < 0 && avctx->width * avctx->height > 720*576) |
| 533 | 538 | s->version = FFMAX(s->version, 2); |