OSDN Git Service

fix silence insertion problem in audio sync and pipeline stall problem
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 3 Apr 2010 21:14:43 +0000 (21:14 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 3 Apr 2010 21:14:43 +0000 (21:14 +0000)
commite0a87cfd2007bb0c862029f19d4340d7c97e37c2
tree0fda94962695504b7abff1826ded9a42715c6e38
parente3bda03cee4f86a664057ba1ebfd85eb71e3128f
fix silence insertion problem in audio sync and pipeline stall problem

the current audio buffer was being dropped when silence was inserted, causing
the time to fall even further behind and provoke more silence insertion
in some cases.

with pont-to-point, it is possible for one stream to complete before the
other(s).  when the work_loop exits for that stream, the fifo is no longer
serviced and may fill.  This can back up and cause a stall in reader
causing the streams that are not yet complete to stall. The Solution is
to continue servicing the fifo after work for a stream is complete.  This was
complicated by the fact that the video sync work object was being used as the
indicator that all work was finished.  When it exited everything was told
to stop.  So now, the muxer work object (last in the chain) is the
indicator when work is done.

git-svn-id: svn://localhost/HandBrake/trunk@3197 b64f7644-9d1e-0410-96f1-a4d463321fa5
libhb/internal.h
libhb/muxcommon.c
libhb/sync.c
libhb/work.c