X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Favformat%2Fconsumer_avformat.c;h=4b44f32e6aa42a2c2912e5d032696e03ed16378f;hb=e0983d216bc8b3d34225d42761060940d6da4f3c;hp=65491eab3865bd4fd35ca8e4c6116f52ec1d52b5;hpb=5707adef397ff18ddd1a86b71d98dde9aab440a4;p=melted diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index 65491ea..4b44f32 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -22,6 +22,7 @@ // mlt Header files #include #include +#include // System header files #include @@ -174,6 +175,7 @@ mlt_consumer consumer_avformat_init( mlt_profile profile, char *arg ) // Default to separate processing threads for producer and consumer with no frame dropping! mlt_properties_set_int( properties, "real_time", -1 ); + mlt_properties_set_int( properties, "prefill", 1 ); // Set up start/stop/terminated callbacks this->start = consumer_start; @@ -520,7 +522,8 @@ static AVStream *add_video_stream( mlt_consumer this, AVFormatContext *oc, int c c->height = mlt_properties_get_int( properties, "height" ); c->time_base.num = mlt_properties_get_int( properties, "frame_rate_den" ); c->time_base.den = mlt_properties_get_int( properties, "frame_rate_num" ); - st->time_base = c->time_base; + if ( st->time_base.den == 0 ) + st->time_base = c->time_base; c->pix_fmt = pix_fmt ? avcodec_get_pix_fmt( pix_fmt ) : PIX_FMT_YUV420P; if ( mlt_properties_get( properties, "aspect" ) )