Order of operations fix in th_movie.cpp

Fixes the test for CODEC_CAP_DELAY to know if we need to flush
buffered frames.