Right. Now look at the pattern: everyone says black until someone dies, then everyone says white until someone dies. Does that really give you a higher chance of survival? This also assumes the entire line is aware of and understands your plan, and that you are able to communicate your idea to the entire line before the hats are placed, but after the villain announces the plan. That's already discounted because the original post stated the hats were already on you before the psycho explains them. Even a single panicked answer could destroy your plan, or everyone could be killed.
The only way is to play the odds. Assume that there is some logic to the distribution of white and black hats, and count how many of each is ahead of you. If there are more white than black, you can conclude that your hat is black, inferring that there are more white hats ahead of you than behind you. Then, you listen and track the responses of the people behind you. If they also show more white hats than black, you can then assume that your hat is more likely to be white, because there are more white hats than black altogether. That is the only logical solution I can think of that doesn't require cooperation and coordination of the entire line... or cheating. (see my previous posts)
However, a completely illogical solution would be to incite a riot and attack your captors. Even automatic weapons have limited effectiveness in close quarters, and they will not be able to kill all of you. Depending on how organized you are, or how panicked you can get them, you odds will be likely higher than 50/50. In addition, you'll have the satisfaction of knowing the madman won't be doing it again.