aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkJpegUtility.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codec/SkJpegUtility.cpp')
-rw-r--r--src/codec/SkJpegUtility.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/codec/SkJpegUtility.cpp b/src/codec/SkJpegUtility.cpp
index c9c8d3b11c..7bfb6bf5e6 100644
--- a/src/codec/SkJpegUtility.cpp
+++ b/src/codec/SkJpegUtility.cpp
@@ -40,6 +40,9 @@ static boolean sk_fill_buffered_input_buffer(j_decompress_ptr dinfo) {
// libjpeg is still happy with a less than full read, as long as the result is non-zero
if (bytes == 0) {
+ // Let libjpeg know that the buffer needs to be refilled
+ src->next_input_byte = nullptr;
+ src->bytes_in_buffer = 0;
return false;
}