Merge pull request #11819 from Snuffleupagus/decodeScan-rm-findNextFileMarker-call
[src/core/jpg.js] Remove redundant marker validation at the end of the `decodeScan` function (PR 11805 follow-up)
This commit is contained in:
commit
c1733d2bcd
@ -136,8 +136,8 @@ var JpegImage = (function JpegImageClosure() {
|
||||
var mcusPerLine = frame.mcusPerLine;
|
||||
var progressive = frame.progressive;
|
||||
|
||||
var startOffset = offset,
|
||||
bitsData = 0,
|
||||
const startOffset = offset;
|
||||
let bitsData = 0,
|
||||
bitsCount = 0;
|
||||
|
||||
function readBit() {
|
||||
@ -455,16 +455,6 @@ var JpegImage = (function JpegImageClosure() {
|
||||
}
|
||||
}
|
||||
|
||||
fileMarker = findNextFileMarker(data, offset);
|
||||
// Some images include more Scan blocks than expected, skip past those and
|
||||
// attempt to find the next valid marker (fixes issue8182.pdf).
|
||||
if (fileMarker && fileMarker.invalid) {
|
||||
warn(
|
||||
`decodeScan - unexpected Scan data, current marker is: ${fileMarker.invalid}`
|
||||
);
|
||||
offset = fileMarker.offset;
|
||||
}
|
||||
|
||||
return offset - startOffset;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user