X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fdv%2Fproducer_libdv.c;h=7a0c16bc1e258efc7145997f822471a9ebccd4b6;hb=4c96cb2b639338d6308dd473983b9b4cbb9e27c9;hp=3891681ed35364924c46c16045841f5d3e53f186;hpb=6425ff4dd74c65b2f82939647744da49edabe0ce;p=melted diff --git a/src/modules/dv/producer_libdv.c b/src/modules/dv/producer_libdv.c index 3891681..7a0c16b 100644 --- a/src/modules/dv/producer_libdv.c +++ b/src/modules/dv/producer_libdv.c @@ -139,7 +139,7 @@ mlt_producer producer_libdv_init( char *filename ) mlt_properties properties = mlt_producer_properties( producer ); // Register transport implementation with the producer - producer->close = producer_close; + producer->close = ( mlt_destructor )producer_close; // Register our get_frame implementation with the producer producer->get_frame = producer_get_frame; @@ -221,9 +221,12 @@ static int producer_collect_info( producer_libdv this ) double fps = this->is_pal ? 25 : 30000.0 / 1001.0; if ( mlt_properties_get_double( properties, "fps" ) == fps ) { - mlt_properties_set_position( properties, "length", this->frames_in_file ); - mlt_properties_set_position( properties, "in", 0 ); - mlt_properties_set_position( properties, "out", this->frames_in_file - 1 ); + if ( this->frames_in_file > 0 ) + { + mlt_properties_set_position( properties, "length", this->frames_in_file ); + mlt_properties_set_position( properties, "in", 0 ); + mlt_properties_set_position( properties, "out", this->frames_in_file - 1 ); + } } else {