History

avcodec/ffv1enc: Fix explicitly set -slicecrc 2

crcref needs to be set properly iff ec is two, regardless of whether it has been explicitly set by the user or set by default based on level/version.

Andreas Rheinhardt committed 1 year ago

Commit a6bcc771 parent 3cbe3411 file · +3 −2Browse files

Unified · Split

libavcodec/ffv1enc.c+3−2
@@ -629,7 +629,6 @@ av_cold int ff_ffv1_encode_init(AVCodecContext *avctx) · 628 unmodified lines
629 if (s->ec < 0) {629 if (s->ec < 0) {
630 if (s->version >= 4) {630 if (s->version >= 4) {
631 s->ec = 2;631 s->ec = 2;
632 s->crcref = 0x7a8c4079;
633 } else if (s->version >= 3) {632 } else if (s->version >= 3) {
634 s->ec = 1;633 s->ec = 1;
635 } else634 } else
@@ -639,8 +638,10 @@ av_cold int ff_ffv1_encode_init(AVCodecContext *avctx) · 3 unmodified lines
639 // CRC requires version 3+638 // CRC requires version 3+
640 if (s->ec == 1)639 if (s->ec == 1)
641 s->version = FFMAX(s->version, 3);640 s->version = FFMAX(s->version, 3);
642 if (s->ec == 2)641 if (s->ec == 2) {
643 s->version = FFMAX(s->version, 4);642 s->version = FFMAX(s->version, 4);
643 s->crcref = 0x7a8c4079;
644 }
644 645
645 if ((s->version == 2 || s->version>3) && avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {646 if ((s->version == 2 || s->version>3) && avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
646 av_log(avctx, AV_LOG_ERROR, "Version 2 or 4 needed for requested features but version 2 or 4 is experimental and not enabled\n");647 av_log(avctx, AV_LOG_ERROR, "Version 2 or 4 needed for requested features but version 2 or 4 is experimental and not enabled\n");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t