I'm using jmf to interact with a webcam. Everything is ok except shutting down the camera. I call MediaPlayer.stopAndDeallocate() and it seems to do its job, the visual component stops receiving image data, but the light on my webcam stays on, indicating that it's still in use. When I try to run the program again, it tells me the cam is in use already unless I reset the jvm. Is there something else I'm suppose to do to release the cam?

Code:
import javax.media.bean.playerbean.MediaPlayer;
import java.awt.BorderLayout;
import javax.swing.*;
import java.awt.event.*;
import javax.media.*;
import java.awt.Component;


public class adsa
{
    public static void main()
    {
        final MediaPlayer mp = new MediaPlayer();
        mp.setMediaLocation("vfw://0");
        mp.setControlPanelVisible(true);
        mp.start();
        mp.realize();
        mp.setFixedAspectRatio(true);
        
        final JFrame frame = new JFrame();
            
        class MyControllerListener implements ControllerListener
        {
            public void controllerUpdate(ControllerEvent e)
            {
                if(e instanceof RealizeCompleteEvent)
                {
                    JPanel p = new JPanel();
                    JPanel cp = new JPanel();
                    p.add(mp.getVisualComponent());
                    frame.getContentPane().add(p, BorderLayout.CENTER);
                    Control[] controls = mp.getControls();
                    for(int i=0;i<controls.length;i++)
                    {   
                        //Component c = controls[i].getControlComponent();
                        //if (c != null)
                        //    cp.add(c);
                    }
                    frame.getContentPane().add(mp.getControlPanelComponent(), BorderLayout.NORTH);
                }
            }
        }
        
        mp.addControllerListener(new MyControllerListener());
        
        class Listener implements ActionListener
        {
            public void actionPerformed(ActionEvent e)
            {
                mp.stopAndDeallocate();
            }
        }
        
        
        
        frame.getContentPane().setLayout(new BorderLayout());

        JButton closeButton = new JButton("Close");
        closeButton.addActionListener(new Listener());
        
        frame.getContentPane().add(closeButton, BorderLayout.SOUTH);
        frame.show();
    }
}