diff options
Diffstat (limited to 'test/test.c')
-rw-r--r-- | test/test.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/test/test.c b/test/test.c index c22cb5eb6..fedff6c3d 100644 --- a/test/test.c +++ b/test/test.c @@ -254,7 +254,9 @@ int main( int argc, char ** argv ) titleindex = 0; } - hb_scan( h, input, titleindex, preview_count, store_previews, min_title_duration * 90000LL ); + hb_prevent_sleep(h); + hb_scan(h, input, titleindex, preview_count, store_previews, + min_title_duration * 90000LL); /* Wait... */ while( !die ) @@ -269,11 +271,14 @@ int main( int argc, char ** argv ) die = 1; break; case 'p': - fprintf( stdout, "\nEncoding Paused by user command, 'r' to resume\n" ); - hb_pause( h ); + fprintf(stdout, + "\nEncoding Paused by user command, 'r' to resume\n"); + hb_pause(h); + hb_allow_sleep(h); break; case 'r': - hb_resume( h ); + hb_prevent_sleep(h); + hb_resume(h); break; case 'h': ShowCommands(); @@ -317,11 +322,14 @@ int main( int argc, char ** argv ) die = 1; break; case 'p': - fprintf( stdout, "\nEncoding Paused by user command, 'r' to resume\n" ); - hb_pause( h ); + fprintf(stdout, + "\nEncoding Paused by user command, 'r' to resume\n"); + hb_pause(h); + hb_allow_sleep(h); break; case 'r': - hb_resume( h ); + hb_prevent_sleep(h); + hb_resume(h); break; case 'h': ShowCommands(); |