summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-04-03 17:20:03 +0000
committerjbrjake <[email protected]>2007-04-03 17:20:03 +0000
commitf7fd5bf767b371eb8d0299d84bafe9da260e3a67 (patch)
tree3dacee17f7133da3528a4cd8bd2e9e7d1d970ff4 /libhb
parent9052711da97518061059fecc3265aa2d93379b39 (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.c19
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(&param, name, value);