diff options
author | jbrjake <[email protected]> | 2007-04-03 17:20:03 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2007-04-03 17:20:03 +0000 |
commit | f7fd5bf767b371eb8d0299d84bafe9da260e3a67 (patch) | |
tree | 3dacee17f7133da3528a4cd8bd2e9e7d1d970ff4 /libhb | |
parent | 9052711da97518061059fecc3265aa2d93379b39 (diff) |
Fix a bus error if b-pyramid is given as an x264 option without specifying a value. (Thanks for alerting me to the bug, saintdev)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@473 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/encx264.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libhb/encx264.c b/libhb/encx264.c index b48bfdafb..a67225b01 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -123,12 +123,19 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) /* Note b-pyramid here, so the initial delay can be doubled */ if (!(strcmp(name, "b-pyramid"))) { - if (atoi(value) > 0) - { - job->areBframes = 2; - } - } - + if (value != NULL) + { + if (atoi(value) > 0) + { + job->areBframes = 2; + } + } + else + { + job->areBframes = 2; + } + } + /* Here's where the strings are passed to libx264 for parsing. */ ret = x264_param_parse(¶m, name, value); |