summaryrefslogtreecommitdiffstats
path: root/libhb/work.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-11-13 19:38:02 -0800
committerJohn Stebbins <[email protected]>2016-01-21 10:09:44 -0700
commitfcb78d5c24387bf2dad2e3c38b4417431b2836ae (patch)
tree8232f55f36175db115ee08ebd5f5e41c29c53949 /libhb/work.c
parent56925edbfa59cda34d3fa45f4c61f48970cee5fb (diff)
sync: gut and rewrite
sync.c was difficult to read, fragile, and prone to difficult to diagnose bugs (see https://forum.handbrake.fr/viewtopic.php?f=12&t=33147) This rewrite simplifies the code, removes signals, locking and yield that probably cause the above problem and is much more flexible. It fixes a wider variety of timestamp issues than before and is much easier to extend if other timestamp analysis is desired.
Diffstat (limited to 'libhb/work.c')
-rw-r--r--libhb/work.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/libhb/work.c b/libhb/work.c
index 31e4cad96..1ed356dd1 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -169,13 +169,11 @@ hb_work_object_t* hb_audio_decoder(hb_handle_t *h, int codec)
if (codec & HB_ACODEC_FF_MASK)
{
w = hb_get_work(h, WORK_DECAVCODEC);
- w->yield = 1; // decoders yield to keep sync fifos more even
}
switch (codec)
{
case HB_ACODEC_LPCM:
w = hb_get_work(h, WORK_DECLPCM);
- w->yield = 1; // decoders yield to keep sync fifos more even
break;
default:
break;
@@ -1570,7 +1568,6 @@ static void do_job(hb_job_t *job)
*job->die = 1;
goto cleanup;
}
- w->yield = 1; // decoders yield to keep sync fifos more even
w->fifo_in = job->fifo_mpeg2;
w->fifo_out = job->fifo_raw;
hb_list_add(job->list_work, w);
@@ -1868,10 +1865,6 @@ void hb_work_loop( void * _w )
}
}
}
- if (w->yield)
- {
- hb_yield();
- }
}
if ( buf_out )
{