]> granicus.if.org Git - handbrake/commit
libhb: Fix issue with silence insertion when using FLAC encoder
authorjstebbins <jstebbins.hb@gmail.com>
Mon, 21 Jan 2013 22:11:14 +0000 (22:11 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Mon, 21 Jan 2013 22:11:14 +0000 (22:11 +0000)
commit35c85b5d02ba6e334192d2977c789d1b7e23e35b
tree8445c9395397ffb61c7b94dda5aabdf4836075e7
parenta5691e14fd8176f640119c9b1134e4850997abd0
libhb: Fix issue with silence insertion when using FLAC encoder

When we insert silence to maintain sync, we typically need to insert about
70ms.  But the default flac frame duration is very large (>=96ms).  This is
causing us to overshoot the target and we immediately drop a frame.  Dropping
a frame undershoots and we insert a frame... ad infinitum.

This patch changes the behavior of silence insertion for non-passthru audio.
Instead of inserting full frames of silence, the last "frame" inserted may be
a partial.  This lets us insert a finer grained silence duration and eliminates
the problem with large flac frames.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5188 b64f7644-9d1e-0410-96f1-a4d463321fa5
libhb/sync.c