its just copying the hardware accellerated video frame into CPU memory
its just copying the hardware accellerated video frame into CPU memory


private static TimeSpan? ToTimeInternal(long ts, AVRational time_base, bool is_duration = false)
{
// sanity check
if (time_base.den == 0)
{
return null;
}
if ((!is_duration && ts == ffmpeg.AV_NOPTS_VALUE) || (is_duration && ts == 0))
{
return null;
}
return new TimeSpan((long)(ts * decimal.Divide(time_base.num, time_base.den) * TimeSpan.TicksPerSecond));
}