Remove function calls from for loop test part in media classes

Change-Id: Ic9a677e9c678da873d936bad62dddbce7891dd07
Merge "Remove function calls from for loop test part in media classes"