X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fdv%2Fproducer_libdv.c;h=cd10b8965f0bcc78add4d9546b54771160ca2183;hb=3d366fcfb46c1ae8ae3e38e15012edb6affd9828;hp=8484b1929c10688acc731a86758ef38e0016addb;hpb=b365faec24d3259f01579a628a9c9d300529da23;p=melted 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