X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fdv%2Fproducer_libdv.c;h=8484b1929c10688acc731a86758ef38e0016addb;hb=ae867071f780e9c61a5013f6f7452850b4151e07;hp=7d5fb25214245307bd013b5a3c755491030fb990;hpb=cdc142529076b33e4856a423547b9e93fb56330a;p=melted diff --git a/src/modules/dv/producer_libdv.c b/src/modules/dv/producer_libdv.c index 7d5fb25..8484b19 100644 --- a/src/modules/dv/producer_libdv.c +++ b/src/modules/dv/producer_libdv.c @@ -151,9 +151,9 @@ mlt_producer producer_libdv_init( char *filename ) producer->get_frame = producer_get_frame; // If we have mov or dv, then we'll use an alternative producer - if ( strncasecmp( strrchr( filename, '.' ), ".avi", 4 ) == 0 || - strncasecmp( strrchr( filename, '.' ), ".dv", 3 ) == 0 || - strncasecmp( strrchr( filename, '.' ), ".mov", 4 ) == 0 ) + if ( strchr( filename, '.' ) != NULL && ( + strncasecmp( strrchr( filename, '.' ), ".avi", 4 ) == 0 || + strncasecmp( strrchr( filename, '.' ), ".mov", 4 ) == 0 ) ) { // Load via an alternative mechanism this->alternative = mlt_factory_producer( "kino", filename ); @@ -300,9 +300,9 @@ static int producer_get_image( mlt_frame this, uint8_t **buffer, mlt_image_forma // Parse the header for meta info dv_parse_header( decoder, dv_data ); - // Assign width and height from properties - *width = mlt_properties_get_int( properties, "width" ); - *height = mlt_properties_get_int( properties, "height" ); + // Assign width and height according to the frame + *width = 720; + *height = dv_data[ 3 ] & 0x80 ? 576 : 480; // Extract an image of the format requested if ( *format == mlt_image_yuv422 )