x264enc: Work around a rate control issue in libx264
authorRobert Swain <robert.swain@collabora.co.uk>
Fri, 22 Oct 2010 09:29:55 +0000 (11:29 +0200)
committerRobert Swain <robert.swain@collabora.co.uk>
Fri, 22 Oct 2010 13:55:34 +0000 (15:55 +0200)
commit6f2db739aed240d080b6a9cfe28ac1ec6d2c753c
treef54740b47d436b08f6219e34ccf64b66ff937164
parent0fa75d404b3bc1f94e654c3d843637f204fa42f2
x264enc: Work around a rate control issue in libx264

When variable framerate is disabled in libx264 (which occurs when using
the zerolatency tuning), libx264 ignores timestamps but still uses the
timebase leading to messed up rate control with our nanosecond timebase.

We work around this issue by setting the timebase to the reciprocal of
the framerate and we validate that the framerate is suitable.

This has been fixed upstream in libx264 but there are non-fixed versions
in the wild so this workaround is still needed.

Fixes bug #632861
ext/x264/gstx264enc.c