[SCM] lives/master: debian/patches/11-svn_rev715.patch: Fix rendering after preview.
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Wed Sep 15 07:30:26 UTC 2010
The following commit has been merged in the master branch:
commit 03748c874b24daa6eee631959988ccf36bab084c
Author: Alessio Treglia <alessio at debian.org>
Date: Wed Sep 15 09:29:47 2010 +0200
debian/patches/11-svn_rev715.patch: Fix rendering after preview.
diff --git a/debian/patches/11-svn_rev715.patch b/debian/patches/11-svn_rev715.patch
new file mode 100644
index 0000000..fb9cf1a
--- /dev/null
+++ b/debian/patches/11-svn_rev715.patch
@@ -0,0 +1,95 @@
+Description: Fix audio rendering after preview.
+Origin: upstream, commit:715
+Applied-Upstream: commit:715
+---
+ src/callbacks.c | 7 ++++++-
+ src/events.c | 15 +++++++++++++++
+ src/saveplay.c | 9 +++++++++
+ 3 files changed, 30 insertions(+), 1 deletion(-)
+
+--- lives.orig/src/callbacks.c
++++ lives/src/callbacks.c
+@@ -8962,6 +8962,11 @@ on_fade_audio_activate (GtkMenuItem
+
+ desensitize();
+ do_threaded_dialog(_("Fading audio..."),FALSE);
++
++ pthread_mutex_lock(&mainw->gtk_mutex);
++ while (g_main_context_iteration(NULL,FALSE));
++ pthread_mutex_unlock(&mainw->gtk_mutex);
++
+ if (!prefs->conserve_space) {
+ com=g_strdup_printf("smogrify backup_audio %s",cfile->handle);
+ dummyvar=system(com);
+@@ -8970,7 +8975,7 @@ on_fade_audio_activate (GtkMenuItem
+
+ aud_fade(mainw->current_file,startt,endt,startv,endv);
+ audio_free_fnames();
+- sleep(5);
++ sleep(2);
+ end_threaded_dialog();
+ d_print_done();
+
+--- lives.orig/src/events.c
++++ lives/src/events.c
+@@ -3102,6 +3102,13 @@ gint render_events (gboolean reset) {
+ out_frame=(gint)((gdouble)(get_event_timecode (event)/U_SECL)*cfile->fps+1.);
+ if (cfile->frames<out_frame) out_frame=cfile->frames+1;
+ cfile->undo_start=out_frame;
++
++ // store this, because if the user previews and there is no audio file yet, achans will get reset
++ cfile->undo_achans=cfile->achans;
++ cfile->undo_arate=cfile->arate;
++ cfile->undo_arps=cfile->arps;
++ cfile->undo_asampsize=cfile->asampsize;
++
+ clear_mainw_msg();
+ mainw->filter_map=NULL;
+ for (i=0;i<65536;i++) {
+@@ -3192,6 +3199,10 @@ gint render_events (gboolean reset) {
+ else {
+ if (has_audio&&!weed_plant_has_leaf(event,"audio_clips")) {
+ // pad to end with silence
++ cfile->achans=cfile->undo_achans;
++ cfile->arate=cfile->undo_arate;
++ cfile->arps=cfile->undo_arps;
++ cfile->asampsize=cfile->undo_asampsize;
+ render_audio_segment(0, NULL, mainw->multitrack!=NULL?mainw->multitrack->render_file:mainw->current_file, NULL, NULL, atime*U_SEC, tc+(U_SEC/cfile->fps*!is_blank), chvols, 1., 1., NULL);
+ }
+ }
+@@ -3230,6 +3241,10 @@ gint render_events (gboolean reset) {
+ }
+
+ if (tc/U_SEC>atime) {
++ cfile->achans=cfile->undo_achans;
++ cfile->arate=cfile->undo_arate;
++ cfile->arps=cfile->undo_arps;
++ cfile->asampsize=cfile->undo_asampsize;
+ render_audio_segment(natracks, xaclips, mainw->multitrack!=NULL?mainw->multitrack->render_file:mainw->current_file, xavel, xaseek, (atime*U_SEC+.5), tc+(U_SEC/cfile->fps*!is_blank), chvols, 1., 1., NULL);
+ for (i=0;i<natracks;i++) {
+ if (xaclips[i]>0) {
+--- lives.orig/src/saveplay.c
++++ lives/src/saveplay.c
+@@ -845,6 +845,8 @@ void save_file (gboolean existing, gchar
+ struct stat filestat;
+ time_t file_mtime=0;
+
++ gulong fsize;
++
+ // new handling for save selection:
+ // symlink images 1 - n to the encoded frames
+ // symlinks are now created in /tmp (for dynebolic)
+@@ -1467,6 +1469,13 @@ void save_file (gboolean existing, gchar
+ mainw->no_switch_dprint=TRUE;
+ d_print_done();
+
++ // get size of file and show it
++
++ fsize=sget_file_size(full_file_name);
++ mesg=g_strdup_printf(_("File size was %.2fMB\n"),(gdouble)fsize/1000000.);
++ d_print(mesg);
++ g_free(mesg);
++
+ if (mainw->subt_save_file!=NULL) {
+ save_subs_to_file(cfile,mainw->subt_save_file);
+ g_free(mainw->subt_save_file);
diff --git a/debian/patches/series b/debian/patches/series
index 28e26b8..5a9e490 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
01-cdda2wav_to_icedax.patch
02-drop_py3_multiencoder.patch
+11-svn_rev715.patch
--
lives packaging
More information about the pkg-multimedia-commits
mailing list