X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Ffile.C;h=17e555aa11e8e6221c93afda84d10e0effba9125;hb=a2adb92f17159c0399504ab4b18acb1d94122077;hp=5e870d42d5f3c0491aa198c989391a55bd17df71;hpb=2d99bb8ce591f05a31464b517d85dc2bc35b2abe;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/file.C b/cinelerra-5.0/cinelerra/file.C index 5e870d42..17e555aa 100644 --- a/cinelerra-5.0/cinelerra/file.C +++ b/cinelerra-5.0/cinelerra/file.C @@ -79,8 +79,11 @@ #include "stringfile.h" #include "vframe.h" - - +//suppress noref warning +void *vorbis0_ov_callbacks[] = { + &OV_CALLBACKS_DEFAULT, &OV_CALLBACKS_NOCLOSE, + &OV_CALLBACKS_STREAMONLY, &OV_CALLBACKS_STREAMONLY_NOCLOSE, +}; File::File() { @@ -795,28 +798,31 @@ int File::open_file(Preferences *preferences, // Reopen file with correct parser and get header. if(file->open_file(rd, wr)) { delete file; - file = 0; + return FILE_NOT_FOUND; } // Set extra writing parameters to mandatory settings. - if(file && wr) { + if( wr ) { if(this->asset->dither) file->set_dither(); } - + if( rd ) { +// one frame image file, no specific length + if( !this->asset->audio_data && this->asset->video_data && + this->asset->video_length <= 1 ) + this->asset->video_length = -1; + } // Synchronize header parameters - if(file) { - asset->copy_from(this->asset, 1); + asset->copy_from(this->asset, 1); //asset->dump(); - } if(debug) printf("File::open_file %d file=%p\n", __LINE__, file); // sleep(1); - return file ? FILE_OK : FILE_NOT_FOUND; + return FILE_OK; } void File::delete_temp_samples_buffer()