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.
Unified · Split
| @@ -444,8 +444,8 @@ static int svq1_encode_plane(SVQ1EncContext *s, int plane, · 443 unmodified lines | ||
| 444 | 444 | put_bits(&s->reorder_pb[5], SVQ1_BLOCK_INTRA_LEN, SVQ1_BLOCK_INTRA_CODE); |
| 445 | 445 | score[0] = SVQ1_BLOCK_INTRA_LEN * lambda; |
| 446 | 446 | } |
| 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); | |
| 449 | 449 | for (i = 0; i < 6; i++) { |
| 450 | 450 | count[0][i] = put_bits_count(&s->reorder_pb[i]); |
| 451 | 451 | flush_put_bits(&s->reorder_pb[i]); |