if there's a pending marker from the entropy stream, return that otherwise, fetch from the stream and get a marker. if there's no marker, return 0xff, which is never a valid marker value
| 3126 | // otherwise, fetch from the stream and get a marker. if there's no |
| 3127 | // marker, return 0xff, which is never a valid marker value |
| 3128 | static stbi_uc stbi__get_marker(stbi__jpeg* j) { |
| 3129 | stbi_uc x; |
| 3130 | if (j->marker != STBI__MARKER_none) { |
| 3131 | x = j->marker; |
| 3132 | j->marker = STBI__MARKER_none; |
| 3133 | return x; |
| 3134 | } |
| 3135 | x = stbi__get8(j->s); |
| 3136 | if (x != 0xff) |
| 3137 | return STBI__MARKER_none; |
| 3138 | while (x == 0xff) |
| 3139 | x = stbi__get8(j->s); // consume repeated 0xff fill bytes |
| 3140 | return x; |
| 3141 | } |
| 3142 | |
| 3143 | // in each scan, we'll have scan_n components, and the order |
| 3144 | // of the components is specified by order[] |
no test coverage detected