I'm getting almost the same problem that is really starting to bug me. It ONLY seems to happen when I'm using a different headset than the one that came with the iPhone. Since I want to cut down on the wear and tear of the stock IP headset (the one with the mike), I have been using the headset that came with my IT.
If I'm listening to the iPod music, there doesn't seem to be a problem. However, if I want to watch a youtube clip, listen to streaming radio (Tuner), etc, after only a few minutes, the iPod music starts up over the audio for whatever source I have going (youtube, etc.). This even happens in my car when I'm plugged into my Aux In.
A couple of months ago I took the IP in to see the Genius and got a load from him that dirt is causing the problem. He recommended I blow the audio port out with compressed air occasionally.
That really doesn't seem to correct this problem.
The only work-around seems to be to us the headset with the mike, but that doesn't help me in my car.
This problem occured with 2.0, 2.1 and now 2.2. I'm wondering if something is loose inside the IP and causing it to switch audio source if the IP is moved.
Today I tried turning off WiFi thinking maybe when the IP switches back and forth between WiFi and 3G, that might be causing the problem.
I also think this problem can drain the battery IF the music turns on accidently. All-in-all, I'm a bit torqued off about this.