FFMPEG module if needed parameter overriding.
authorDiego Barrios Romero <eldruin@gmailcom>
Tue, 23 Feb 2010 01:24:36 +0000 (02:24 +0100)
committerDiego Barrios Romero <eldruin@gmailcom>
Tue, 23 Feb 2010 01:24:36 +0000 (02:24 +0100)
synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp

index 4159ac9..57d0b9d 100644 (file)
@@ -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()