git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.2@1720
362d55ac-95cf-4e76-9f9a-
cbaa9c17b72d
}\r
else\r
{\r
- video_stream->nb_frames = (video_stream->duration*video_stream->time_base.num*video_context->time_base.den)/(video_stream->time_base.den*video_context->time_base.num*video_context->ticks_per_frame); }\r
+ auto stream_time = video_stream->time_base;\r
+ auto duration = video_stream->duration;\r
+ auto codec_time = video_context->time_base;\r
+ auto ticks = video_context->ticks_per_frame;\r
+\r
+ if(video_stream->nb_frames == 0)\r
+ video_stream->nb_frames = (duration*stream_time.num*codec_time.den)/(stream_time.den*codec_time.num*ticks); \r
+ }\r
}\r
}\r
\r