From 4b877e1f8b645fbb57bbe66ff80903ff59395fda Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 18 Jun 2012 15:42:23 +0000 Subject: [PATCH] Some options used for "expert" x264 setup were removed from FFmpeg 0.11 Prevent crashes in cases when option can't be found. --- source/blender/blenkernel/intern/writeffmpeg.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 532bd257ae1..b3101638a4e 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1206,7 +1206,7 @@ int BKE_ffmpeg_property_add_string(RenderData *rd, const char *type, const char char name_[128]; char *name; char *param; - IDProperty *prop; + IDProperty *prop = NULL; avcodec_get_context_defaults(&c); @@ -1234,9 +1234,11 @@ int BKE_ffmpeg_property_add_string(RenderData *rd, const char *type, const char } if (param && o->type != FF_OPT_TYPE_CONST && o->unit) { p = my_av_find_opt(&c, param, o->unit, 0, 0); - prop = BKE_ffmpeg_property_add(rd, - (char *) type, p - c.av_class->option, - o - c.av_class->option); + if (p) { + prop = BKE_ffmpeg_property_add(rd, + (char *) type, p - c.av_class->option, + o - c.av_class->option); + } } else { prop = BKE_ffmpeg_property_add(rd,