]> git.sesse.net Git - mlt/commitdiff
Make libdv producer return some image even if unable to handle specific image type...
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 8 Jan 2006 20:16:56 +0000 (20:16 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 8 Jan 2006 20:16:56 +0000 (20:16 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@883 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/dv/producer_libdv.c

index 8484b1929c10688acc731a86758ef38e0016addb..cd10b8965f0bcc78add4d9546b54771160ca2183 100644 (file)
@@ -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