jpeg_resync_to_restart

Name

jpeg_resync_to_restart -- resync if marker other than expected restart marker found

Synopsis

#include <jpeglib.h>

boolean jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired);

Description

jpeg_resync_to_restart() is the default resync procedure that a data source manager can invoke when the decompressor fails to find a restart (RSTn) marker where one is expected. The function shall find a suitable point for resuming decompression and position the input stream to the next data segment. The desired restart marker number (0..7) is passed as argument "desired".

Return Value

jpeg_resync_to_restart() shall return FALSE if decompression is suspended. Otherwise, jpeg_start_output() shall return TRUE.