forked from bartvdbraak/blender
Workaround for #28864: crash rendering out file with audio, due to scene audio
channels being set to invalid value 0. The cause of this is unclear, this adds a version patch just to be safe, in case it turns out to be a common issue.
This commit is contained in:
parent
89dd5e933f
commit
4689d78b5c
@ -12163,9 +12163,16 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
Scene *sce;
|
||||
bNodeTree *ntree;
|
||||
|
||||
for (sce=main->scene.first; sce; sce=sce->id.next)
|
||||
for (sce=main->scene.first; sce; sce=sce->id.next) {
|
||||
/* there are files with invalid audio_channels value, the real cause
|
||||
is unknown, but we fix it here anyway to avoid crashes */
|
||||
if(sce->r.ffcodecdata.audio_channels == 0)
|
||||
sce->r.ffcodecdata.audio_channels = 2;
|
||||
|
||||
if (sce->nodetree)
|
||||
do_versions_nodetree_image_default_alpha_output(sce->nodetree);
|
||||
}
|
||||
|
||||
for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next)
|
||||
do_versions_nodetree_image_default_alpha_output(ntree);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user