         trace('Unable to stop if we never reached play.');
         return false;
       }
+      sendTeardownReq();
       state = STATE_TEARDOWN_SENT;
-      sendTeardownReq();
       return true;
     }
 

  import flash.events.Event;
  import flash.utils.ByteArray;
  import flash.net.Socket;

  import com.axis.rtspclient.FLVMux;
  import com.axis.rtspclient.RTP;

    }

    private function sendPlayReq():void {
      if (state === STATE_PAUSED) {
        /* NetStream was closed when pausing. Play it again if that is the case. */
        Player.getNetStream().play(null);
      }

      var req:String =
        "PLAY " + contentBase + " RTSP/1.0\r\n" +
        "CSeq: " + (++cSeq) + "\r\n" +
