X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Fsrc%2FMltFrame.cpp;fp=mlt%2B%2B%2Fsrc%2FMltFrame.cpp;h=0595a68ce6864f81d37c848202c6b07bf1e63e71;hb=96f33fa9a85baf3b53d1a6961a70bb6f123fa11a;hp=c12adf871a4d36433a0b53bd1727ebd89ff199dc;hpb=6a622d4b2d78aa761d94b77c40c2b9b3fe2168ed;p=melted diff --git a/mlt++/src/MltFrame.cpp b/mlt++/src/MltFrame.cpp index c12adf8..0595a68 100644 --- a/mlt++/src/MltFrame.cpp +++ b/mlt++/src/MltFrame.cpp @@ -52,7 +52,22 @@ mlt_properties Frame::get_properties( ) uint8_t *Frame::get_image( mlt_image_format &format, int &w, int &h, int writable ) { uint8_t *image = NULL; + if ( mlt_properties_get_int( get_properties( ), "consumer_aspect_ratio" ) == 0 ) + mlt_properties_set_int( get_properties( ), "consumer_aspect_ratio", 1 ); mlt_frame_get_image( get_frame( ), &image, &format, &w, &h, writable ); + set( "format", format ); + set( "writable", writable ); + return image; +} + +unsigned char *Frame::fetch_image( mlt_image_format f, int w, int h, int writable ) +{ + uint8_t *image = NULL; + if ( mlt_properties_get_int( get_properties( ), "consumer_aspect_ratio" ) == 0 ) + mlt_properties_set_int( get_properties( ), "consumer_aspect_ratio", 1 ); + mlt_frame_get_image( get_frame( ), &image, &f, &w, &h, writable ); + set( "format", f ); + set( "writable", writable ); return image; }