File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -366,8 +366,19 @@ SPAN_DECLARE(void) t38_non_ecm_buffer_report_output_status(t38_non_ecm_buffer_st
366
366
367
367
SPAN_DECLARE (void ) t38_non_ecm_buffer_set_mode (t38_non_ecm_buffer_state_t * s , bool image_mode , int min_bits_per_row )
368
368
{
369
+ bool old_mode ;
370
+
371
+ old_mode = s -> image_data_mode ;
369
372
s -> image_data_mode = image_mode ;
370
373
s -> min_bits_per_row = min_bits_per_row ;
374
+
375
+ /* If we are changing modes, we need to restart the buffer to initialise the new mode. Usually the buffer will
376
+ restart as it empties at the end of a TCF or image operation. However, something like a change of page size,
377
+ which will cause a new DCS and TCF sequence, will only detect the need for a mode change from image to
378
+ TCF after the buffer has reset automatically at the end of the last image. */
379
+ if (image_mode != old_mode )
380
+ restart_buffer (s );
381
+ /*endif*/
371
382
}
372
383
/*- End of function --------------------------------------------------------*/
373
384
You can’t perform that action at this time.
0 commit comments