From e7fa5d24cdd7275611ed738e3dfc909fe30ad317 Mon Sep 17 00:00:00 2001 From: maxd Date: Tue, 5 Nov 2013 13:46:42 +0000 Subject: RB626: return code support added git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5876 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/enctheora.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libhb/enctheora.c') diff --git a/libhb/enctheora.c b/libhb/enctheora.c index d398f7717..48d130479 100644 --- a/libhb/enctheora.c +++ b/libhb/enctheora.c @@ -273,6 +273,7 @@ int enctheoraWork( hb_work_object_t * w, hb_buffer_t ** buf_in, if( bytes < 0 ) { hb_error("Error requesting stats size in second pass."); + *job->done_error = HB_ERROR_UNKNOWN; *job->die = 1; return HB_WORK_DONE; } @@ -291,6 +292,7 @@ int enctheoraWork( hb_work_object_t * w, hb_buffer_t ** buf_in, fread( pv->stat_buf+pv->stat_fill, 1, size, pv->file ) < size ) { hb_error("Could not read frame data from two-pass data file!"); + *job->done_error = HB_ERROR_UNKNOWN; *job->die = 1; return HB_WORK_DONE; } @@ -304,6 +306,7 @@ int enctheoraWork( hb_work_object_t * w, hb_buffer_t ** buf_in, if( ret < 0 ) { hb_error("Error submitting pass data in second pass."); + *job->done_error = HB_ERROR_UNKNOWN; *job->die = 1; return HB_WORK_DONE; } @@ -349,12 +352,14 @@ int enctheoraWork( hb_work_object_t * w, hb_buffer_t ** buf_in, if( bytes < 0 ) { fprintf(stderr,"Could not read two-pass data from encoder.\n"); + *job->done_error = HB_ERROR_UNKNOWN; *job->die = 1; return HB_WORK_DONE; } if( fwrite( buffer, 1, bytes, pv->file ) < bytes) { fprintf(stderr,"Unable to write to two-pass data file.\n"); + *job->done_error = HB_ERROR_UNKNOWN; *job->die = 1; return HB_WORK_DONE; } -- cgit v1.2.3