From: ddennedy Date: Sun, 8 Jan 2006 20:16:56 +0000 (+0000) Subject: Make libdv producer return some image even if unable to handle specific image type... X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=faa3437c5e1562266bee71012e9373a75fbb8a4e;p=melted Make libdv producer return some image even if unable to handle specific image type request. git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@883 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/dv/producer_libdv.c b/src/modules/dv/producer_libdv.c index 8484b19..cd10b89 100644 --- a/src/modules/dv/producer_libdv.c +++ b/src/modules/dv/producer_libdv.c @@ -305,7 +305,7 @@ static int producer_get_image( mlt_frame this, uint8_t **buffer, mlt_image_forma *height = dv_data[ 3 ] & 0x80 ? 576 : 480; // Extract an image of the format requested - if ( *format == mlt_image_yuv422 ) + if ( *format == mlt_image_yuv422 || *format == mlt_image_yuv420p ) { // Allocate an image uint8_t *image = mlt_pool_alloc( *width * ( *height + 1 ) * 2 ); @@ -320,8 +320,9 @@ static int producer_get_image( mlt_frame this, uint8_t **buffer, mlt_image_forma // Assign result *buffer = image; + *format = mlt_image_yuv422; } - else if ( *format == mlt_image_rgb24 ) + else { // Allocate an image uint8_t *image = mlt_pool_alloc( *width * ( *height + 1 ) * 3 ); @@ -336,6 +337,7 @@ static int producer_get_image( mlt_frame this, uint8_t **buffer, mlt_image_forma // Assign result *buffer = image; + *format = mlt_image_rgb24; } // Return the decoder