diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-18 19:42:23 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-18 19:42:23 +0400 |
commit | 4b877e1f8b645fbb57bbe66ff80903ff59395fda (patch) | |
tree | 63d35eb233a8b3bc8fe7e5b83a951ce110fa34e8 /source/blender/blenkernel/intern/writeffmpeg.c | |
parent | bdfcc5c619e2bc30d477c5bdfdf3d7bc54d6c947 (diff) |
Some options used for "expert" x264 setup were removed from FFmpeg 0.11
Prevent crashes in cases when option can't be found.
Diffstat (limited to 'source/blender/blenkernel/intern/writeffmpeg.c')
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 10 |
1 files 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, |