Doubt From Rotation


My teacher says that it is possible to apply angular momentum conservation about hinge O.
But I feel that it is not possible to apply angular momentum conservation about hinge O because the torque of "mg" doesn't cancel out and we have remaining net torque of mgR. So,the net torque about O is not zero then,how can we apply angular momentum conservation about it?

I will be thankful for help!

Imo, angular momentum can't be conserved because the net torque is not zero about the hinge.
But, the torque is not due to mg but due to frictional force on the pulley as it is the only force acting on the pulley....