mm-video: vdec: Fix for blocking pthread_join

If a file descriptor being monitored by poll() is closed in
another thread, the result is unspecified. So, poll() might
not exit on closing the fd. This change fixes the issue by
always calling stop command before closing the fd. On
receipt of stop done, poll thread exits and then fd can be
closed.

Change-Id: I9e258e90c2c8687659aeb8616778fa1ff9fc8436
CRs-fixed: 478727
1 file changed