summaryrefslogtreecommitdiffstats
path: root/libhb/work.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-05-18 09:31:05 -0600
committerJohn Stebbins <[email protected]>2016-05-18 09:31:05 -0600
commit7d290195368d5229066e2516d597928dd7315514 (patch)
tree191fc2f5520f109c42d55223effcdd0cfe5ba44c /libhb/work.c
parent8964f5b518a16b4b19494b6f138f113f7f27bfb7 (diff)
work: don't allocate fifos that are not needed for indepth_scan
Diffstat (limited to 'libhb/work.c')
-rw-r--r--libhb/work.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/libhb/work.c b/libhb/work.c
index 0d971f32f..87ab19f83 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -1494,18 +1494,24 @@ static void do_job(hb_job_t *job)
{
job->fifo_mpeg2 = hb_fifo_init( FIFO_MINI, FIFO_MINI_WAKE );
job->fifo_raw = hb_fifo_init( FIFO_MINI, FIFO_MINI_WAKE );
- job->fifo_sync = hb_fifo_init( FIFO_MINI, FIFO_MINI_WAKE );
- job->fifo_render = hb_fifo_init( FIFO_MINI, FIFO_MINI_WAKE );
- job->fifo_mpeg4 = hb_fifo_init( FIFO_MINI, FIFO_MINI_WAKE );
+ if (!job->indepth_scan)
+ {
+ job->fifo_sync = hb_fifo_init( FIFO_MINI, FIFO_MINI_WAKE );
+ job->fifo_render = hb_fifo_init( FIFO_MINI, FIFO_MINI_WAKE );
+ job->fifo_mpeg4 = hb_fifo_init( FIFO_MINI, FIFO_MINI_WAKE );
+ }
}
else
#endif
{
job->fifo_mpeg2 = hb_fifo_init( FIFO_LARGE, FIFO_LARGE_WAKE );
job->fifo_raw = hb_fifo_init( FIFO_SMALL, FIFO_SMALL_WAKE );
- job->fifo_sync = hb_fifo_init( FIFO_SMALL, FIFO_SMALL_WAKE );
- job->fifo_mpeg4 = hb_fifo_init( FIFO_LARGE, FIFO_LARGE_WAKE );
- job->fifo_render = NULL; // Attached to filter chain
+ if (!job->indepth_scan)
+ {
+ job->fifo_sync = hb_fifo_init( FIFO_SMALL, FIFO_SMALL_WAKE );
+ job->fifo_render = NULL; // Attached to filter chain
+ job->fifo_mpeg4 = hb_fifo_init( FIFO_LARGE, FIFO_LARGE_WAKE );
+ }
}
result = sanitize_audio(job);
@@ -1525,10 +1531,10 @@ static void do_job(hb_job_t *job)
audio = hb_list_item(job->list_audio, i);
/* set up the audio work fifos */
+ audio->priv.fifo_in = hb_fifo_init(FIFO_LARGE, FIFO_LARGE_WAKE);
audio->priv.fifo_raw = hb_fifo_init(FIFO_SMALL, FIFO_SMALL_WAKE);
audio->priv.fifo_sync = hb_fifo_init(FIFO_SMALL, FIFO_SMALL_WAKE);
audio->priv.fifo_out = hb_fifo_init(FIFO_LARGE, FIFO_LARGE_WAKE);
- audio->priv.fifo_in = hb_fifo_init(FIFO_LARGE, FIFO_LARGE_WAKE);
// Add audio decoder work object
w = hb_audio_decoder(job->h, audio->config.in.codec);
@@ -1573,9 +1579,12 @@ static void do_job(hb_job_t *job)
{
// decsrtsub is a buffer source like reader. It's input comes
// from a file.
- subtitle->fifo_in = hb_fifo_init( FIFO_SMALL, FIFO_SMALL_WAKE );
+ subtitle->fifo_in = hb_fifo_init( FIFO_SMALL, FIFO_SMALL_WAKE );
+ }
+ if (!job->indepth_scan)
+ {
+ subtitle->fifo_out = hb_fifo_init( FIFO_SMALL, FIFO_SMALL_WAKE );
}
- subtitle->fifo_out = hb_fifo_init( FIFO_SMALL, FIFO_SMALL_WAKE );
w->fifo_in = subtitle->fifo_in;
w->fifo_out = subtitle->fifo_raw;