I got the solution for this problem. The problem was not with the dvd drive but with the lens of dvd drive. Actually, this problem is caused by the accumulation of dust particles in the lens of the dvd drive.
So, to solve this problem I brought a dvd lens cleaner which had a tiny 2 brushes in the sides of the DVD disc which cost below 1$. And after using this, the dvd drive again started working fine.