summaryrefslogtreecommitdiffstats
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
parent8964f5b518a16b4b19494b6f138f113f7f27bfb7 (diff)
work: don't allocate fifos that are not needed for indepth_scan
-rw-r--r--libhb/sync.c6
-rw-r--r--libhb/work.c27
2 files changed, 18 insertions, 15 deletions
diff --git a/libhb/sync.c b/libhb/sync.c
index 456fc2094..413011913 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -1581,13 +1581,7 @@ static int syncVideoInit( hb_work_object_t * w, hb_job_t * job)
pv->stream->video.id = job->title->video_id;
w->fifo_in = job->fifo_raw;
- // sync performs direct output to fifos
w->fifo_out = job->fifo_sync;
- if (job->indepth_scan)
- {
- // When doing subtitle indepth scan, the pipeline ends at sync
- w->fifo_out = NULL;
- }
if (job->pass_id == HB_PASS_ENCODE_2ND)
{
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;