History

avcodec/svq1enc: Don't add to NULL

It is undefined behavior. Pass a dummy buffer instead. Fixes "runtime error: applying non-zero offset 1024 to null pointer". affected the SVQ1 vsynth FATE tests.

Andreas Rheinhardt committed 1 year ago

Commit d76ae081 parent 02c16b41 file · +2 −2Browse files

Unified · Split

libavcodec/svq1enc.c+2−2
@@ -444,8 +444,8 @@ static int svq1_encode_plane(SVQ1EncContext *s, int plane, · 443 unmodified lines
444444 put_bits(&s->reorder_pb[5], SVQ1_BLOCK_INTRA_LEN, SVQ1_BLOCK_INTRA_CODE);
445445 score[0] = SVQ1_BLOCK_INTRA_LEN * lambda;
446446 }
447− score[0] += encode_block(s, src + 16 * x, NULL, temp, stride,
448− 5, 64, lambda, 1);
447+ score[0] += encode_block(s, src + 16 * x, src + 16 * x /* unused */,
448+ temp, stride, 5, 64, lambda, 1);
449449 for (i = 0; i < 6; i++) {
450450 count[0][i] = put_bits_count(&s->reorder_pb[i]);
451451 flush_put_bits(&s->reorder_pb[i]);

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