projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add histogram frame averaging, lock renderengine during updates, fix ffmpeg btn booby
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
indexfile.C
diff --git
a/cinelerra-5.1/cinelerra/indexfile.C
b/cinelerra-5.1/cinelerra/indexfile.C
index e73a87100a8fa56cd769ffc28807e3c2eeec60c0..0337d0c2062d9e932051f86721b2939c7f61d1a9 100644
(file)
--- a/
cinelerra-5.1/cinelerra/indexfile.C
+++ b/
cinelerra-5.1/cinelerra/indexfile.C
@@
-228,7
+228,7
@@
void IndexFile::delete_index(Preferences *preferences,
char index_filename[BCTEXTLEN];
char source_filename[BCTEXTLEN];
const char *path = indexable->path;
char index_filename[BCTEXTLEN];
char source_filename[BCTEXTLEN];
const char *path = indexable->path;
-
+ if( !*path ) return;
get_index_filename(source_filename,
preferences->index_directory,
index_filename, path, suffix);
get_index_filename(source_filename,
preferences->index_directory,
index_filename, path, suffix);
@@
-374,9
+374,10
@@
void IndexFile::close_source()
delete render_engine;
render_engine = 0;
delete render_engine;
render_engine = 0;
-
- delete cache;
- cache = 0;
+ if( cache ) {
+ cache->remove_user();
+ cache = 0;
+ }
}
int64_t IndexFile::get_required_scale()
}
int64_t IndexFile::get_required_scale()
@@
-707,10
+708,9
@@
SET_TRACE
// Start and length of fragment to read from file in bytes.
float *buffer = 0;
int buffer_shared = 0;
// Start and length of fragment to read from file in bytes.
float *buffer = 0;
int buffer_shared = 0;
- int rect_audio = mwindow->preferences->rectify_audio;;
- int center_pixel = !rect_audio ?
- mwindow->edl->local_session->zoom_track / 2 :
- mwindow->edl->local_session->zoom_track;
+ int rect_audio = mwindow->preferences->rectify_audio;
+ int data_h = edit->track->data_h;
+ int center_pixel = !rect_audio ? data_h/2 : data_h;
if( edit->track->show_titles() )
center_pixel += mwindow->theme->get_image("title_bg_data")->get_h();
if( edit->track->show_titles() )
center_pixel += mwindow->theme->get_image("title_bg_data")->get_h();
@@
-747,9
+747,9
@@
SET_TRACE
int prev_y1 = center_pixel;
int prev_y2 = center_pixel;
int first_frame = 1;
int prev_y1 = center_pixel;
int prev_y2 = center_pixel;
int first_frame = 1;
- int zoom_y =
!rect_audio ?
- mwindow->edl->local_session->zoom_y / 2 :
-
mwindow->edl->local_session->zoom_y
;
+ int zoom_y =
mwindow->edl->local_session->zoom_y * data_h /
+ mwindow->edl->local_session->zoom_atrack;
+
if( !rect_audio ) zoom_y /= 2
;
int max_y = center_pixel + zoom_y - 1;
edit_position = (x + pixmap->pixmap_x - virtual_edit_x) * project_zoom;
int64_t speed_position = edit->startsource;
int max_y = center_pixel + zoom_y - 1;
edit_position = (x + pixmap->pixmap_x - virtual_edit_x) * project_zoom;
int64_t speed_position = edit->startsource;