// MLT Header files
#include <framework/mlt_producer.h>
#include <framework/mlt_frame.h>
+#include <framework/mlt_profile.h>
// ffmpeg Header files
#include <avformat.h>
#include <pthread.h>
#include <math.h>
+#if LIBAVUTIL_VERSION_INT < (50<<16)
+#define PIX_FMT_YUYV422 PIX_FMT_YUV422
+#endif
+
void avformat_lock( );
void avformat_unlock( );
// mlt_properties_set_double( meta_media, key, av_q2d( context->streams[ i ]->time_base ) );
snprintf( key, sizeof(key), "meta.media.%d.codec.name", i );
mlt_properties_set( meta_media, key, codec->name );
+#if (LIBAVCODEC_VERSION_INT >= ((51<<16)+(55<<8)+0))
snprintf( key, sizeof(key), "meta.media.%d.codec.long_name", i );
mlt_properties_set( meta_media, key, codec->long_name );
+#endif
snprintf( key, sizeof(key), "meta.media.%d.codec.bit_rate", i );
mlt_properties_set_int( meta_media, key, codec_context->bit_rate );
// snprintf( key, sizeof(key), "meta.media.%d.codec.time_base", i );
else
{
AVPicture output;
- avpicture_fill( &output, buffer, PIX_FMT_YUV422, width, height );
- img_convert( &output, PIX_FMT_YUV422, (AVPicture *)frame, pix_fmt, width, height );
+ avpicture_fill( &output, buffer, PIX_FMT_YUYV422, width, height );
+ img_convert( &output, PIX_FMT_YUYV422, (AVPicture *)frame, pix_fmt, width, height );
}
#endif
}