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
629629 if (s->ec < 0) {
630630 if (s->version >= 4) {
631631 s->ec = 2;
632− s->crcref = 0x7a8c4079;
633632 } else if (s->version >= 3) {
634633 s->ec = 1;
635634 } else
@@ -639,8 +638,10 @@ av_cold int ff_ffv1_encode_init(AVCodecContext *avctx) · 3 unmodified lines
639638 // CRC requires version 3+
640639 if (s->ec == 1)
641640 s->version = FFMAX(s->version, 3);
642− if (s->ec == 2)
641+ if (s->ec == 2) {
643642 s->version = FFMAX(s->version, 4);
643+ s->crcref = 0x7a8c4079;
644+ }
644645
645646 if ((s->version == 2 || s->version>3) && avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
646647 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