in reply to The system command and waiting for the child process to finish

Most likely it's mplayer itself that doesn't wait. If you take a small test program like

perl -e 'sleep 5; echo $$'

then likely the whole setup works.