From: Diego Barrios Romero Date: Tue, 23 Feb 2010 01:24:36 +0000 (+0100) Subject: FFMPEG module if needed parameter overriding. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6d0a3a3708d8dd5288ef1b302c36331fb005a218;p=synfig.git FFMPEG module if needed parameter overriding. --- diff --git a/synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp b/synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp index 4159ac9..57d0b9d 100644 --- a/synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp +++ b/synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp @@ -90,8 +90,17 @@ ffmpeg_trgt::ffmpeg_trgt(const char *Filename, buffer=NULL; color_buffer=0; set_remove_alpha(); - video_codec = params.video_codec; - bitrate = params.bitrate; + + // Set default video codec and bitrate if they weren't given. + if (params.video_codec == "none") + video_codec = "mpeg1video"; + else + video_codec = params.video_codec; + + if (params.bitrate == -1) + bitrate = 200; + else + bitrate = params.bitrate; } ffmpeg_trgt::~ffmpeg_trgt()