* \brief interface for all frame classes
* \see mlt_frame_s
*
- * Copyright (C) 2003-2009 Ushodaya Enterprises Limited
+ * Copyright (C) 2003-2013 Ushodaya Enterprises Limited
* \author Charles Yates <charles.yates@pandora.be>
+ * \author Dan Dennedy <dan@dennedy.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* \public \memberof mlt_frame_s
* \param self a frame
- * \param the get_image callback
+ * \param get_image the get_image callback
* \return true if error
*/
FILE *file;
char filename[16];
- sprintf( filename, "frame-%05d.ppm", mlt_frame_get_position( frame ) );
+ sprintf( filename, "frame-%05d.ppm", (int)mlt_frame_get_position( frame ) );
file = fopen( filename, "wb" );
if ( !file )
return;
mlt_frame new_frame = mlt_frame_init( NULL );
mlt_properties properties = MLT_FRAME_PROPERTIES( self );
mlt_properties new_props = MLT_FRAME_PROPERTIES( new_frame );
+ int width = mlt_properties_get_int( properties, "width" );
+ int height = mlt_properties_get_int( properties, "height" );
void *data, *copy;
int size;
mlt_properties_set_data( new_props, "movit.convert",
mlt_properties_get_data( properties, "movit.convert", NULL), 0, NULL, NULL );
+ mlt_properties_set_int( new_props, "meta.media.width", width );
+ mlt_properties_set_int( new_props, "meta.media.height", height );
+
if ( is_deep )
{
data = mlt_properties_get_data( properties, "audio", &size );
{
if ( ! size )
size = mlt_image_format_size( mlt_properties_get_int( properties, "format" ),
- mlt_properties_get_int( properties, "width" ),
- mlt_properties_get_int( properties, "height" ), NULL );
+ width, height, NULL );
copy = mlt_pool_alloc( size );
memcpy( copy, data, size );
mlt_properties_set_data( new_props, "image", copy, size, mlt_pool_release, NULL );
if ( data )
{
if ( ! size )
- size = mlt_properties_get_int( properties, "width" ) *
- mlt_properties_get_int( properties, "height" );
+ size = width * height;
copy = mlt_pool_alloc( size );
memcpy( copy, data, size );
mlt_properties_set_data( new_props, "alpha", copy, size, mlt_pool_release, NULL );