fix for [#28201] blender crashes when "mpeg" selected

2 changes
- When writing OGG only allow Theora encoding, this fixes the crash.
- When setting the MPEG preset, dont allow the 'Codec' to be left as Theora, this is just confusing.

* note that this is highly confusing for users and devs - there are 4 places to set the codec/format, with both python and C presets :S.
This commit is contained in:
2011-08-10 07:36:44 +00:00
parent a10e00dc57
commit 3a9b288bc7

View File

@@ -658,10 +658,12 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
switch(ffmpeg_type) {
case FFMPEG_AVI:
case FFMPEG_MOV:
case FFMPEG_OGG:
case FFMPEG_MKV:
fmt->video_codec = ffmpeg_codec;
break;
case FFMPEG_OGG:
fmt->video_codec = CODEC_ID_THEORA;
break;
case FFMPEG_DV:
fmt->video_codec = CODEC_ID_DVVIDEO;
break;
@@ -1310,6 +1312,9 @@ void ffmpeg_verify_image_type(RenderData *rd)
/* 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;
}
audio= 1;
}