Bugfix for [#29684] Output video presets messed up
[blender.git] / source / blender / blenkernel / intern / writeffmpeg.c
index aa7d71b1577089a010214cfa755ee92e16d58456..bf547584b9e9360c2cf4b71ff66ee30a967e8ed8 100644 (file)
@@ -1333,11 +1333,11 @@ void ffmpeg_set_preset(RenderData *rd, int preset)
        }
 }
 
-void ffmpeg_verify_image_type(RenderData *rd)
+void ffmpeg_verify_image_type(RenderData *rd, ImageFormatData *imf)
 {
        int audio= 0;
 
-       if(rd->imtype == R_IMF_IMTYPE_FFMPEG) {
+       if(imf->imtype == R_IMF_IMTYPE_FFMPEG) {
                if(rd->ffcodecdata.type <= 0 ||
                   rd->ffcodecdata.codec <= 0 ||
                   rd->ffcodecdata.audio_codec <= 0 ||
@@ -1353,19 +1353,19 @@ void ffmpeg_verify_image_type(RenderData *rd)
 
                audio= 1;
        }
-       else if(rd->imtype == R_IMF_IMTYPE_H264) {
+       else if(imf->imtype == R_IMF_IMTYPE_H264) {
                if(rd->ffcodecdata.codec != CODEC_ID_H264) {
                        ffmpeg_set_preset(rd, FFMPEG_PRESET_H264);
                        audio= 1;
                }
        }
-       else if(rd->imtype == R_IMF_IMTYPE_XVID) {
+       else if(imf->imtype == R_IMF_IMTYPE_XVID) {
                if(rd->ffcodecdata.codec != CODEC_ID_MPEG4) {
                        ffmpeg_set_preset(rd, FFMPEG_PRESET_XVID);
                        audio= 1;
                }
        }
-       else if(rd->imtype == R_IMF_IMTYPE_THEORA) {
+       else if(imf->imtype == R_IMF_IMTYPE_THEORA) {
                if(rd->ffcodecdata.codec != CODEC_ID_THEORA) {
                        ffmpeg_set_preset(rd, FFMPEG_PRESET_THEORA);
                        audio= 1;