projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
plug leaks, leaker tweaks, lang for effect info, c41 spiffs, wm probe tweaks
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
indexfile.C
diff --git
a/cinelerra-5.1/cinelerra/indexfile.C
b/cinelerra-5.1/cinelerra/indexfile.C
index dfb5d6b2d21b36993198bd81a7f570c440b2f54a..61e81cb5e48070f76c3ec0a871d2ba6c883b2275 100644
(file)
--- a/
cinelerra-5.1/cinelerra/indexfile.C
+++ b/
cinelerra-5.1/cinelerra/indexfile.C
@@
-141,7
+141,6
@@
IndexFile::IndexFile(MWindow *mwindow,
this->mwindow = mwindow;
this->indexable = indexable;
redraw_timer = new Timer;
this->mwindow = mwindow;
this->indexable = indexable;
redraw_timer = new Timer;
-
if(indexable)
{
indexable->add_user();
if(indexable)
{
indexable->add_user();
@@
-433,6
+432,9
@@
SET_TRACE
// open the source file
if(open_source()) return 1;
// open the source file
if(open_source()) return 1;
+ source_channels = indexable->get_audio_channels();
+ source_samplerate = indexable->get_sample_rate();
+ source_length = indexable->get_audio_samples();
SET_TRACE
SET_TRACE
@@
-738,9
+740,7
@@
SET_TRACE
int prev_y2 = center_pixel;
int first_frame = 1;
int zoom_y = mwindow->edl->local_session->zoom_y, zoom_y2 = zoom_y / 2;
int prev_y2 = center_pixel;
int first_frame = 1;
int zoom_y = mwindow->edl->local_session->zoom_y, zoom_y2 = zoom_y / 2;
- int max_y = canvas->get_h();
- int zmax_y = center_pixel + zoom_y2 - 1;
- if( zmax_y < max_y ) max_y = zmax_y;
+ int max_y = center_pixel + zoom_y2 - 1;
SET_TRACE
for(int bufferposition = 0;
SET_TRACE
for(int bufferposition = 0;
@@
-868,16
+868,19
@@
int IndexFile::read_info(Indexable *test_indexable)
// Read the file format & index state.
if(test_indexable->is_asset)
{
// Read the file format & index state.
if(test_indexable->is_asset)
{
- Asset *asset = (Asset*)test_indexable;
+ Asset *test_asset = (Asset *)test_indexable;
+ Asset *asset = new Asset;
asset->read(&xml);
asset->read(&xml);
-
+ int ret = 0;
//printf("IndexFile::read_info %d %f\n", __LINE__, asset->get_frame_rate());
//printf("IndexFile::read_info %d %f\n", __LINE__, asset->get_frame_rate());
- if(
asset->format == FILE_UNKNOWN)
- {
+ if(
asset->format == FILE_UNKNOWN ||
+
test_asset->format != asset->format )
{
if(debug) printf("IndexFile::read_info %d\n", __LINE__);
if(debug) printf("IndexFile::read_info %d\n", __LINE__);
- ret
urn
1;
+ ret
=
1;
}
}
+ asset->remove_user();
+ if( ret ) return ret;
}
else
{
}
else
{