HI Alessandro, Has AVFoundation changed? Or do you think that the original code was likely wrong all along?
If there is chance that different versions work slightly different then making your suggested change could break older versions so we might need to put some version handling around it. Robert. On 19 January 2018 at 08:50, Alessandro Terenzi <[email protected]> wrote: > Hi, > I found out that when you want to know the duration of a media file, > specifically a movie, the instruction: > > > Code: > _videoDuration = CMTimeGetSeconds([_data->avplayer.currentItem duration]); > > > > returns 0, I tried to use the following instead: > > > Code: > _videoDuration = CMTimeGetSeconds([[_data->avplayer.currentItem asset] > duration]); > > > > that seems to return the correct movie's duration in seconds. > > If you agree I will send a pull request about this fix. > > Cheers, > Alessandro > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=72784#72784 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

