Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-06 07:08:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-06 07:08:47 +0400
commit86dd087057f4300fb3ec82844697fb4ef17d2e0f (patch)
tree6b2c7b5fe728610b525a0343ca2b22924c1c6757 /source/blender/blenkernel/intern/writeffmpeg.c
parent04b5ef20f138412701c807b1c3f151c2a69cad82 (diff)
fix [#32475] Enabled audio lets blender crash with autosplit option for movie output
Diffstat (limited to 'source/blender/blenkernel/intern/writeffmpeg.c')
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 3526058e12b..cd07ac3b9ed 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -946,6 +946,7 @@ int BKE_ffmpeg_start(struct Scene *scene, RenderData *rd, int rectx, int recty,
}
void BKE_ffmpeg_end(void);
+static void end_ffmpeg_impl(int is_autosplit);
#ifdef WITH_AUDASPACE
static void write_audio_frames(double to_pts)
@@ -978,7 +979,7 @@ int BKE_ffmpeg_append(RenderData *rd, int start_frame, int frame, int *pixels, i
if (ffmpeg_autosplit) {
if (avio_tell(outfile->pb) > FFMPEG_AUTOSPLIT_SIZE) {
- BKE_ffmpeg_end();
+ end_ffmpeg_impl(TRUE);
ffmpeg_autosplit_count++;
success &= start_ffmpeg_impl(rd, rectx, recty, reports);
}
@@ -991,7 +992,7 @@ int BKE_ffmpeg_append(RenderData *rd, int start_frame, int frame, int *pixels, i
return success;
}
-void BKE_ffmpeg_end(void)
+static void end_ffmpeg_impl(int is_autosplit)
{
unsigned int i;
@@ -1004,9 +1005,11 @@ void BKE_ffmpeg_end(void)
#endif
#ifdef WITH_AUDASPACE
- if (audio_mixdown_device) {
- AUD_closeReadDevice(audio_mixdown_device);
- audio_mixdown_device = 0;
+ if (is_autosplit == FALSE) {
+ if (audio_mixdown_device) {
+ AUD_closeReadDevice(audio_mixdown_device);
+ audio_mixdown_device = 0;
+ }
}
#endif
@@ -1069,6 +1072,11 @@ void BKE_ffmpeg_end(void)
}
}
+void BKE_ffmpeg_end(void)
+{
+ end_ffmpeg_impl(FALSE);
+}
+
/* properties */
void BKE_ffmpeg_property_del(RenderData *rd, void *type, void *prop_)