consumer_avformat.c: bugfix (kdenlive-450) bad timestamps in MPEG-2 Transport Stream...
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 14 Jan 2009 08:42:23 +0000 (08:42 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 14 Jan 2009 08:42:23 +0000 (08:42 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1316 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/avformat/consumer_avformat.c

index 65491ea..e6fa1c3 100644 (file)
@@ -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" ) )