summaryrefslogtreecommitdiffstats
path: root/libhb/enctheora.c
diff options
context:
space:
mode:
authormaxd <[email protected]>2013-11-05 13:46:42 +0000
committermaxd <[email protected]>2013-11-05 13:46:42 +0000
commite7fa5d24cdd7275611ed738e3dfc909fe30ad317 (patch)
treef0478754e3d930d44782e313c3fa21cb465f6b22 /libhb/enctheora.c
parenta89397c1e3358b5f690b046481388ade19316fda (diff)
RB626: return code support added
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5876 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/enctheora.c')
-rw-r--r--libhb/enctheora.c5
1 files changed, 5 insertions, 0 deletions
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;
}