mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-12 14:39:58 +08:00
Suppress MJPEG fprintf() runtime warning
TBR=harryjin@google.com BUG=libyuv:630 TEST=local build and try bots pass Review URL: https://codereview.chromium.org/2264293002 .
This commit is contained in:
parent
920151f2b5
commit
36ae08ce1c
@ -62,6 +62,7 @@ void init_source(jpeg_decompress_struct* cinfo);
|
||||
void skip_input_data(jpeg_decompress_struct* cinfo, long num_bytes); // NOLINT
|
||||
void term_source(jpeg_decompress_struct* cinfo);
|
||||
void ErrorHandler(jpeg_common_struct* cinfo);
|
||||
void OutputHandler(jpeg_common_struct* cinfo);
|
||||
|
||||
MJpegDecoder::MJpegDecoder()
|
||||
: has_scanline_padding_(LIBYUV_FALSE),
|
||||
@ -77,6 +78,7 @@ MJpegDecoder::MJpegDecoder()
|
||||
decompress_struct_->err = jpeg_std_error(&error_mgr_->base);
|
||||
// Override standard exit()-based error handler.
|
||||
error_mgr_->base.error_exit = &ErrorHandler;
|
||||
error_mgr_->base.output_message = &OutputHandler;
|
||||
#endif
|
||||
decompress_struct_->client_data = NULL;
|
||||
source_mgr_->init_source = &init_source;
|
||||
@ -456,7 +458,12 @@ void ErrorHandler(j_common_ptr cinfo) {
|
||||
// and causes it to return (for a second time) with value 1.
|
||||
longjmp(mgr->setjmp_buffer, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
void OutputHandler(j_common_ptr cinfo) {
|
||||
// Suppress fprintf warnings.
|
||||
}
|
||||
|
||||
#endif // HAVE_SETJMP
|
||||
|
||||
void MJpegDecoder::AllocOutputBuffers(int num_outbufs) {
|
||||
if (num_outbufs != num_outbufs_) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user