X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Findexfile.C;h=a5f12bcaaa1dda0272fbe9da5a485a172c82b4d3;hb=51fdff4109828a112ac1006a92bdbdd1ba9b18a5;hp=b62379b2c71108630c1d5f23fb33464da23c7462;hpb=af2d680fc71d16363f7f7fb7e602cb0c30015ee5;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/indexfile.C b/cinelerra-5.1/cinelerra/indexfile.C index b62379b2..a5f12bca 100644 --- a/cinelerra-5.1/cinelerra/indexfile.C +++ b/cinelerra-5.1/cinelerra/indexfile.C @@ -866,16 +866,19 @@ int IndexFile::read_info(Indexable *test_indexable) // 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); - + int ret = 0; //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__); - return 1; + ret = 1; } + asset->remove_user(); + if( ret ) return ret; } else {