[x264-devel] commit: Fix ticks_per_frame check for VFR input (Jason Garrett-Glaser )
git at videolan.org
git at videolan.org
Fri Nov 26 00:57:13 CET 2010
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Thu Nov 25 13:01:16 2010 -0800| [2f8ad9797d5118168d128f38544607494dfc0f73] | committer: Jason Garrett-Glaser
Fix ticks_per_frame check for VFR input
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=2f8ad9797d5118168d128f38544607494dfc0f73
---
x264.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/x264.c b/x264.c
index bba17b8..4f536bf 100644
--- a/x264.c
+++ b/x264.c
@@ -1630,7 +1630,8 @@ static int encode( x264_param_t *param, cli_opt_t *opt )
i_start = x264_mdate();
/* ticks/frame = ticks/second / frames/second */
ticks_per_frame = (int64_t)param->i_timebase_den * param->i_fps_den / param->i_timebase_num / param->i_fps_num;
- FAIL_IF_ERROR( ticks_per_frame < 1, "ticks_per_frame invalid: %"PRId64"\n", ticks_per_frame )
+ FAIL_IF_ERROR( ticks_per_frame < 1 && !param->b_vfr_input, "ticks_per_frame invalid: %"PRId64"\n", ticks_per_frame )
+ ticks_per_frame = X264_MAX( ticks_per_frame, 1 );
if( !param->b_repeat_headers )
{
More information about the x264-devel
mailing list