From: ddennedy Date: Wed, 14 Jan 2009 08:42:23 +0000 (+0000) Subject: consumer_avformat.c: bugfix (kdenlive-450) bad timestamps in MPEG-2 Transport Stream... X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=1c6107cc1bf167db12f2f5328cf091a33033e2a6;p=melted consumer_avformat.c: bugfix (kdenlive-450) bad timestamps in MPEG-2 Transport Stream and possibly quite a few other formats. git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1316 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index 65491ea..e6fa1c3 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -520,7 +520,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" ) )