Cycles: svn merge -r41225:41232 ^/trunk/blender
[blender.git] / source / blender / blenkernel / intern / writeffmpeg.c
index da1412dac0db1aad728678561ba428f14a9c356f..ed0a351716c417c5fd72ff775733016af57cd030 100644 (file)
@@ -396,20 +396,6 @@ static void set_ffmpeg_property_option(AVCodecContext* c, IDProperty * prop)
        }
 }
 
-static int ffmpeg_proprty_valid(AVCodecContext *c, const char *prop_name, IDProperty *curr)
-{
-       int valid= 1;
-
-       if(strcmp(prop_name, "video")==0) {
-               if(strcmp(curr->name, "bf")==0) {
-                       /* flash codec doesn't support b frames */
-                       valid&= c->codec_id!=CODEC_ID_FLV1;
-               }
-       }
-
-       return valid;
-}
-
 static void set_ffmpeg_properties(RenderData *rd, AVCodecContext *c, const char * prop_name)
 {
        IDProperty * prop;
@@ -428,8 +414,7 @@ static void set_ffmpeg_properties(RenderData *rd, AVCodecContext *c, const char
        iter = IDP_GetGroupIterator(prop);
 
        while ((curr = IDP_GroupIterNext(iter)) != NULL) {
-               if(ffmpeg_proprty_valid(c, prop_name, curr))
-                       set_ffmpeg_property_option(c, curr);
+               set_ffmpeg_property_option(c, curr);
        }
 }
 
@@ -1102,7 +1087,7 @@ IDProperty *ffmpeg_property_add(RenderData *rd, char * type, int opt_index, int
                idp_type = IDP_FLOAT;
                break;
        case FF_OPT_TYPE_STRING:
-               val.str = (char *)"                                                                               ";
+               val.str = "                                                                               ";
                idp_type = IDP_STRING;
                break;
        case FF_OPT_TYPE_CONST:
@@ -1202,9 +1187,6 @@ void ffmpeg_set_preset(RenderData *rd, int preset)
 {
        int isntsc = (rd->frs_sec != 25);
 
-       if(rd->ffcodecdata.properties)
-               IDP_FreeProperty(rd->ffcodecdata.properties);
-
        switch (preset) {
        case FFMPEG_PRESET_VCD:
                rd->ffcodecdata.type = FFMPEG_MPEG1;
@@ -1235,11 +1217,8 @@ void ffmpeg_set_preset(RenderData *rd, int preset)
        case FFMPEG_PRESET_DVD:
                rd->ffcodecdata.type = FFMPEG_MPEG2;
                rd->ffcodecdata.video_bitrate = 6000;
-
-               /* Don't set resolution, see [#21351]
-                * rd->xsch = 720;
-                * rd->ysch = isntsc ? 480 : 576; */
-
+               rd->xsch = 720;
+               rd->ysch = isntsc ? 480 : 576;
                rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
                rd->ffcodecdata.rc_max_rate = 9000;
                rd->ffcodecdata.rc_min_rate = 0;
@@ -1342,8 +1321,8 @@ void ffmpeg_verify_image_type(RenderData *rd)
                   rd->ffcodecdata.video_bitrate <= 1) {
 
                        rd->ffcodecdata.codec = CODEC_ID_MPEG2VIDEO;
-
-                       ffmpeg_set_preset(rd, FFMPEG_PRESET_DVD);
+                       /* Don't set preset, disturbs render resolution.
+                        * ffmpeg_set_preset(rd, FFMPEG_PRESET_DVD); */
                }
                if(rd->ffcodecdata.type == FFMPEG_OGG) {
                        rd->ffcodecdata.type = FFMPEG_MPEG2;
@@ -1377,3 +1356,4 @@ void ffmpeg_verify_image_type(RenderData *rd)
 }
 
 #endif
+