GUACAMOLE-482: Merge encoding error handling improvements.

This commit is contained in:
James Muehlner 2018-02-06 21:30:30 -08:00
commit 9ed3baf004
2 changed files with 10 additions and 3 deletions

View File

@ -63,8 +63,11 @@ static int guacenc_read_instructions(guacenc_display* display,
/* Continuously read and handle all instructions */ /* Continuously read and handle all instructions */
while (!guac_parser_read(parser, socket, -1)) { while (!guac_parser_read(parser, socket, -1)) {
guacenc_handle_instruction(display, parser->opcode, if (guacenc_handle_instruction(display, parser->opcode,
parser->argc, parser->argv); parser->argc, parser->argv)) {
guac_parser_free(parser);
return 1;
}
} }
/* Fail on read/parse error */ /* Fail on read/parse error */

View File

@ -228,7 +228,11 @@ int guacenc_video_advance_timeline(guacenc_video* video,
/* Flush frames to bring timeline in sync, duplicating if necessary */ /* Flush frames to bring timeline in sync, duplicating if necessary */
do { do {
guacenc_video_flush_frame(video); if (guacenc_video_flush_frame(video)) {
guacenc_log(GUAC_LOG_ERROR, "Unable to flush frame to video "
"stream.");
return 1;
}
} while (--elapsed != 0); } while (--elapsed != 0);
} }