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
| 2917 | // otherwise, fetch from the stream and get a marker. if there's no |
| 2918 | // marker, return 0xff, which is never a valid marker value |
| 2919 | static stbi_uc stbi__get_marker(stbi__jpeg *j) |
| 2920 | { |
| 2921 | stbi_uc x; |
| 2922 | if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } |
| 2923 | x = stbi__get8(j->s); |
| 2924 | if (x != 0xff) return STBI__MARKER_none; |
| 2925 | while (x == 0xff) |
| 2926 | x = stbi__get8(j->s); // consume repeated 0xff fill bytes |
| 2927 | return x; |
| 2928 | } |
| 2929 | |
| 2930 | // in each scan, we'll have scan_n components, and the order |
| 2931 | // of the components is specified by order[] |
no test coverage detected