fix crash and video blocking when seeking

avcodec_flush_buffers() immediatly after seeking may cause a crash or
blocking the thread, but
i don't know why.
TODO: flush in AVThread when got a flush packet