~mdw
/
dvdrip
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c0bff52
)
dvd-sector-copy.c: Adjust the base position when shifting.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 18 Feb 2022 22:51:28 +0000
(22:51 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 18 Feb 2022 22:51:28 +0000
(22:51 +0000)
Fixes stupid bug.
dvd-sector-copy.c
patch
|
blob
|
blame
|
history
diff --git
a/dvd-sector-copy.c
b/dvd-sector-copy.c
index
a2cf9c6
..
c336d3d
100644
(file)
--- a/
dvd-sector-copy.c
+++ b/
dvd-sector-copy.c
@@
-557,7
+557,7
@@
static ssize_t recovery_read(struct recoverybuf *r,
} else {
if (r->end + diff > r->sz) r->end = r->sz - diff;
rearrange_sectors(r, r->start + diff, r->start, r->end - r->start);
} else {
if (r->end + diff > r->sz) r->end = r->sz - diff;
rearrange_sectors(r, r->start + diff, r->start, r->end - r->start);
- r->start += diff; r->end += diff;
+ r->
pos -= diff; r->
start += diff; r->end += diff;
#ifdef DEBUG
show_recovery_buffer_map(r, "shifted up by %"PRIuSEC"", diff);
#endif
#ifdef DEBUG
show_recovery_buffer_map(r, "shifted up by %"PRIuSEC"", diff);
#endif
@@
-577,7
+577,7
@@
static ssize_t recovery_read(struct recoverybuf *r,
} else {
if (r->start < diff) r->start = diff;
rearrange_sectors(r, r->start - diff, r->start, r->end - r->start);
} else {
if (r->start < diff) r->start = diff;
rearrange_sectors(r, r->start - diff, r->start, r->end - r->start);
- r->start -= diff; r->end -= diff;
+ r->
pos += diff; r->
start -= diff; r->end -= diff;
#ifdef DEBUG
show_recovery_buffer_map(r, "shifted down by %"PRIuSEC"", diff);
#endif
#ifdef DEBUG
show_recovery_buffer_map(r, "shifted down by %"PRIuSEC"", diff);
#endif